Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a google document spreadsheet that I want to export as csv. The problem is, that some cell get their content included on quotation marks:

1,1,"I don't want quote",Mee too but I'm lucky,1

To avoid this issue, I usually re-edit the field on google document until the export excludes the quotation marks (I don't know why or when they are included).

I've tried with format but apparently it doesn't help. What should I do?

share|improve this question
It is normal for quote marks to be added in CSV for text fields that contain reserved characters (e.g. '",). Which program are you having problems importing the CSV into? – RedGrittyBrick Jan 18 '12 at 14:50
I've built the importing program myself... yes, I could strip away the quote, but that's not what I asked. – michelemarcon Jan 18 '12 at 14:59
If you have a , in the cell how is the export program supposed to handle it with your way? – laurent Jan 18 '12 at 15:33
The , is handled with a custom tag (like \COMMA). I have written the export program AND I'm writing the data myself. – michelemarcon Jan 18 '12 at 16:20
up vote 1 down vote accepted

I have a google document spreadsheet that I want to export as csv

It may be unpalateable but it seems you want to download it in a format that is not CSV but which is a bit like CSV yet incompatible with it. It is possible Google does not accomodate arbitrary user-defined formats.

I don't know why or when [quote-marks] are included

When the data value for a cell contains delimiter characters such as a comma.

What should I do?

Any of

  • Use CSV and use an appropriate CSV-parsing or CSV-reading library function in the programming language you are using.

  • Use CSV and pre-process the file using another language that has good CSV handling library functions (Perl springs to mind but there are many) then write the data in a format your program can cope with

  • Use "Text" (actually .TSV) which uses tabs as separators instead of commas and doesn't quote fields that contain commas. Change your program to split by tabs not commas. Hope that your program never encounters data values that contain tabs.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .