View semicolon-separated .csv files in gnumeric - csv

I have a semicolon-separated csv file over here, and I would like to be able to look at it with gnumeric. Sadly, gnumeric does not read the semicolon as a separator.
I have tried:
appending sep=; on the first line
clicking through the GUI menus
using sed to replace the semicolons with commas (sadly, that leads to breakage, since by document occasionally uses commas within cells
What else can I do?

In recent versions of gnumeric a new Import Data tool is available. To launch the tool choose Data|Import Data|Import Text File... from the menu.
In the Import Data File dialog choose your file and hit Open.
In the next screen select Separated format and click Forward
In the following screen select a separator from a number of available options and click Forward once again to choose the columns to import.
Click Finish to complete.

Solution that worked for me in a comma separated csv file with dot decimal separators:
Open .csv file from a text editor
replace all "," with ";" (semicolon)
replace all dot decimal separators "." with ","
save file
open gnumeric, go to Data -> Get External Data -> Import Text File
and then open the saved file
hit Forward and Finish
save as a gnumeric file

Related

How to create an extra line in csv file for indesign

I'm creating an CSV file in excel which will be used in an Indesign document.
Is there a way to create an extra line (like you do with alt+enter in excel) in your csv file?
I tried /n, /r, "text", even double ""text""
all of these didn't create an new line in Indesign for me.
Encountered the same issue many moons ago and got around it via the following:
Enter a unique symbol in the CSV where you want the line break to appear
Data Merge
Then Edit - Find/Change
Enter the unique symbol in the find field
Enter end of paragraph symbol (^p) in replace field

Importing .csv files and saving as .dta

I have a folder containing a number of csv files, e.g. "leeds dz.csv", "leeds gh.csv", "leeds fr.csv". The first part of the file names is constant (i.e. always "leeds").
I want to import each to Stata individually, convert to .dta file and save it. Currently I have this code:
cd "etcetc"
clear
local myfilelist : dir . files"*.csv"
foreach file of local myfilelist {
drop _all
insheet using `file', comma
local outfile = subinstr("`file'",".csv","",.)
save "`outfile'", replace
}
The code works fine if I rename all the .csv files manually to delete the "leeds" part, ie if each .csv is named "dz.csv" instead of "leeds dz.csv" etc.
However, if I do not do this deletion I receive the error "invalid 'dz.csv' "
I'm guessing this has something to do with my 3rd line of code, in particular the "*.csv". But I'm unsure how to adapt the code/ why it won't allow me to import files with a space in the name?
The line
insheet using `file', comma
will be problematic with any filename containing spaces.
Try
insheet using "`file'", comma
The help for insheet is quite explicit on this:
If filename is specified without an extension, .raw is assumed. If your
filename contains embedded spaces, remember to enclose it in double
quotes.

I am getting a CSV file genereated from datamapper. But the values are written into the file within double quotes. How to overcome this issue

The output of my datamapper is a csv file. And the output looks like the below one.
For eg:
"1","10"
"3","40"
But my requirement"
1,10
3,40
What configuration should i do to get the o/p as required. Pls suggest!!!
Click on the options circled in red on the destination profile and uncheck the check box "Quote Strings" in the pop up that comes there after .
Some times the CSV file has this Quotes by default

SSIS package for export data into csv file to FTP

I'm creating SSIS package for to get .csv file to my local server and transfer it to FTP
When I get my csv into FTP and open into excel, My data getting shift over to other columns. Is there internally any kind set up do I need to change?
Also I tried different text qualifier still did not work.
It sounds like there may be hidden characters in your data set. If you are using comma's you may want to consider using a lesser used character for the delimiter such as a pipe "|". For instance an address may naturally have comma's. If a pipe shows up in an address field it's probably a type-o, and is far less likely. Things that shift data cells are often things like tab characters and CRLF. You can also open your data set in a text editor like notepad ++ and choose the "Show all Characters" option under "View->Show Symbols" menu option to see what the exact character is. If it's rampant in your data set you can use the replace function within the Derived Column Task to scrub the data as it comes out of the data source.

How to tell what type of newline is being used in a txt file?

I have a txt file which contains quoted, comma deliminated text, and i am trying to figure out what type of newline is being used.
The reason is because i am trying to import it into mysql server, using local infile, and obviously i need to tell it the correct LINES TERMINATED BY
When i use either \n or \r\n it imports exactly half, of the records only, skipping a line each time.
But when i use \r it imports exactly double, giving me the exact number of rows as all values null, as there are records.
When i open the file in notepad, there is no space in between lines, however, if i open it in a browser, there is a blank line in between each line, as though there is a paragraph there somewhere. Like wise if i choose "open with > Excel" it does not put into columns, and has a blank line between each. The only way to open properly in excel is to use "get external data > From text" and choose comma deliminator.
I provide a couple of lines below exactly by just copying and pasting, and obviously it would be great if someone could let me know the correct settings to use for importing. But i it would be even more great, if there was a way for me to quickly know what type of newline any particular file is using (there is also a blank line at the very end of the file as per the other rows).
"Item No.","Description","Description 2","Customers Price","Home stock","Brand Name","Expected date for delivery","Item Group No.","Item Group Name","Item Product Link (Web)","Item Picture Link (Web)","EAN/UPC","Weight","UNSPSC code","Product type code","Warranty"
"/5PL0006","Drum Unit","DK-23","127.00","32","Kyocera","04/11/2013","800002","Drums","http://uk.product.com/product.aspx?id=%2f5PL0006","http://s.product.eu/products/2_PICTURE-TAKEN.JPG","5711045360824","0.30","44103109","","3M"
"/DK24","DK-24 Drum Unit FS-3750","","119.00","8","Dell","08/11/2013","800002","Drums","http://uk.product.com/product.aspx?id=%2fDK24","http://s.product.eu/products/2_PICTURE-TAKEN.JPG","5711045360718","0.20","44103109","","3M"