View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Stop Excel from stripping out leading zeros when saving as CSV

"MattM" wrote in message
...
Many thanks for the help, Gary's Student.

However, I'm not sure what you're saying is correct. Have another look at
my
original post. After saving the file in Excel, I then do what you've
suggested (see my step 6 - which should be step 5! sorry): open the CSV
file
in a text editor. And the zeros are gone.

In other words, it's not a presentation issue - Excel really has stripped
out the leading zeros. Despite the fact that I didn't go anywhere near the
relevant part of the file (namely, cell A1), during my editing.


What he was saying was that the problem was when you read the original .CSV
file into Excel. If you rename the original file to .TXT then you can
specify the cell formats as text when you read the file in, but if you
merely read a .CSV file into Excel, it will make its own mind up on the cell
format and you'll get the problem you reported.
--
David Biddulph