CSV formatting issue

S

sueasmith31

I currently use Excel 2002 with SP3. I have a file I create in a worksheet
and have formatted a numeric field to be text so that I can maintain a 12
character string. I then "Save-As" a CSV file in order for it to be used in
another application. Up until 3 weeks ago, the formatting was correct - now
no matter what I do, when the "text column is converted to CSV, the column
converts to a "general" format and I lose my character string of 12 digits
(leading 0's).
Aside from having to add " " around the string - is there some other
technique I can use so that I am not manually adding all the quotes?
 
D

David Biddulph

Are you sure that you have lost the formatting is lost when you write to the
CSV? Have you tried looking at the CSV with something like Notepad after
the CSV has been written? I think you'll find that the CSV has the format
as you had previously displayed it in Excel.

My guess is that your problem is that you have used Excel to open the CSV,
and at that stage EXCEL has changed the formatting. Don't open a CSV with
Excel if you want the formatting to remain unchanged. [If you do want to
look at the CSV with Excel, don't use File/ Open but instead use Data/
Import External Data and specify the format of each column as text.]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top