Leading Zeros

E

Eric Graham

I need a way to leave leading zeros in a column in a worksheet that is being
saved as a .csv file. I save the file as a csv, then when I open it back up
instead of having say 002 it just have 2. The cells are formatted as text.
 
E

Earl Kiosterud

Eric,

It probably is writing the zeroes. If you're reopening the csv file in
Excel, that's probably when the zeroes are getting dropped. Try opening it
with NotePad, or any text editor. It will show you exactly what's there,
character for character. If you determine that it isn't writing it
correctly, then instead of saving as csv, try the Text Write Program at
www.smokeylake.com/excel. It writes a text file exactly as it appears.
There's also a bunch of information on text files and Excel there.
 
G

Guest

You can open the csv file using data>get external data, text files, then in
the file>open window select *.* for all files as opposed to *.txt, then the
text import wizard will start, click next twice, under column data format
select text, click finish and import to a new worksheet. The hazzle is that
you have to save it over and over again since it gets imported into a
workbook. Better perhaps would just be to rename the file to txt extension
and then the text import wizard will start automatically, repeat the
previous instruction.The good thing with this is that it will open the file
itself and not import it into another workbook

Regards,

Peo Sjoblom
 

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