View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
jjk98 jjk98 is offline
external usenet poster
 
Posts: 14
Default Double quotes when exporting to tab delimited file

Unfortunately your solution does not work. If the string contains a comma
(and potentially other non-alphabetic characters, I'm still experimenting)
Excel will place a double quote at the start and end of the string upon
export in addition to doubling any instances of the double quote character.
Thus the string

Roy Rogers sang "Adios, Amigo"

becomes

"Roy Rogers sang ""Adios, Amigo"""

If one replaces the paired double quotes with a single instance, then after
replacement one has

"Roy Rogers sang "Adios, Amigo""

And a second replacement yields

"Roy Rogers sang "Adios, Amigo

which is not the original string.

Why does Excel do this?

Is there any other export format that does not modify the source text? For
subsequent processing I must have the output as a text file but I do not care
what the delimiter is (tab is best, any non printable character is OK) and
there are a few printable characters such as =, <, , \, |, {, }, and few
others that are also OK.


--
Thanks for your help - jjk98


"JR Hester" wrote:

Excel will always place text inside quotes when exporting as described. One
option is to run a find replace on eth resulting text file from Wordpad or
another text editor. replace "" with " should work for you.

HTH

"jjk98" wrote:

When exporting a worksheet to a tab delimited text file (.txt), fields
explicitly typed as text which contain a double quote (") are changed by
replacing each occurence of the single " with a pair of them.

For example the text in the spreadsheet reads: "Tin Foil" Revenues the
exported text is ""Tin Foil"" Revenues.

How do I stop this action? I have Excell 2007 and my spreadsheet has many
thousands of quoted strings.
--
Thanks for your help - jjk98