View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
kassie kassie is offline
external usenet poster
 
Posts: 268
Default Converting xls to CSV file - dropping leading 0s

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.

"vanjohnson" wrote:

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??