Displaying Numbers as Text in CSV
Posted by Mamet on December 31, 2001 8:19 AM
have an ASP page that downloads a CSV file of data.
In this data are some IDs that should be treated as Text but, when the file is opened in Excel, they are treated as numbers. Leading zeroes are dropped.
I have tried to enclose the IDs in double quotes, but the leading zeroes are still dropped.
I have tried starting each field with a single quote, in an attempt to alert Excel that the field is text, but the single quote appears in the cell with the actual value of the ID. That is unacceptable.
Is there any way to "trick" Excel into treating a numeric field as text - without displaying unwanted characters in the cell?
Thanks for your time,