Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

How does one specify a cell to contain exactly one double-quote character in a TSV file so that it will be handled correctly when imported (as a spreadsheet) into GoogleDocs? (Note: when importing the file, Tab rather than Automatic must be specified as Separator Character in the import dialog; if I don't do this, the imported sheet has even more problems.)

I have tried all of the following, without success

"
'"
""
'"'

I also tried manually inserting a lone double-quote character in one cell of a GoogleDocs spreadsheet, and then downloading the spreadsheet and inspecting the downloaded file. Frustratingly enough, the downloaded file shows a lone double-quote character (i.e. not escaped in any way) between the flanking tab characters.

BTW, this means, among other things, that GoogleDocs spreadsheets cannot do the download-re-import round trip. E.g. if the spreadsheet I downloaded is re-imported (exactly as it was delivered by GoogleDocs) into a GoogleDocs spreadsheet (specifying tab as a separator character in the import dialog), the formatting is messed up; the lone double quote apparently has the effect of escaping the subsequent tab, so the import does not recognize it as a separator.

I stress that what I'm looking is for how to write the TSV so that it gets imported correctly into a GoogleDocs spreadsheet. IOW, simply entering the double-quote manually into a Google spreadsheet is of no use here.

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Try four double-quotes, e.g.

""""

According to Wikipedia there is no reliable standard, but some attempts have been made.

A (double) quote character in a field must be represented by two double quote characters.
share|improve this answer
    
Amazing. I wouldn't have guessed this one in a million years. Three double-quotes is maybe understandable (as in "the outer quotes quote the middle one"), but four of them makes no sense to me. But it works! Thanks! –  kjo May 14 '12 at 0:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.