Converting xls to CSV file - dropping leading 0s

V

vanjohnson

I'm using Excel 2003 and trying to convert a file to a CSV file... when I
save it as a CSV file it drops the leading zeros on a column that is numbers
stored as text.

I've stored the numbers as text in Excel using three methods:
1 - they all start with a ' as in '00123 '00124
2 - under Format > Cells, I've selected Text
3 - under Data > Text to Columns I've selected the column data format as text.

When I save as CSV file and then reopen it using Excel, it drops my zeros. I
have also heard that I should change the file extension to .txt, but when I
do this, it just changes it to .txt.csv and the zeros are still dropped.

When I save the same CSV file as a notepad, the zeros are there, but when I
open the notepad file in Excel, the zeros are dropped.

Any suggestions??
 
K

kassie

When you want to open the file, change the name to whatever .txt, iso .csv.
If you now open it, you invoke the import wizard, which allows you to open it
correctly, without loosing the leading zeros.
 

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