R
Rick
I've come up with a sort of a work-around for the issue of Excel
converting text fields in a CSV file to an exponential number when you
open it without going through the text import wizard.
If you append a tab character (ASCII 9) to the end of the field, right
before the comma, Excel will import the field as text. You still have
a tab character at the end of the field, but you can't see it. If you
cursor past it in the edit bar, you have to press the cursor key to
get past it twice and if you copy and paste the field into a text
editor, the tab will come with it. But if all you want to do is look
at it, there isn't a problem.
I've tried this only with Excel 2003.
I tried a few other characters to see what would happen. A leading or
trailing space won't stop the conversion. A NULL character at the end
won't stop it either. A Chr(3) at the end will stop it, but Excel
puts up a funny mark where it is in the string. Chr(27) in front has
a similar effect.
converting text fields in a CSV file to an exponential number when you
open it without going through the text import wizard.
If you append a tab character (ASCII 9) to the end of the field, right
before the comma, Excel will import the field as text. You still have
a tab character at the end of the field, but you can't see it. If you
cursor past it in the edit bar, you have to press the cursor key to
get past it twice and if you copy and paste the field into a text
editor, the tab will come with it. But if all you want to do is look
at it, there isn't a problem.
I've tried this only with Excel 2003.
I tried a few other characters to see what would happen. A leading or
trailing space won't stop the conversion. A NULL character at the end
won't stop it either. A Chr(3) at the end will stop it, but Excel
puts up a funny mark where it is in the string. Chr(27) in front has
a similar effect.