excel xls to csv numbers stored as txt lose first 0

S

steve44122

we have a mix field with some having only numbers. it is text. when
converting it to a csv the 0 in the first column are lost.... this happens
only to fields that are only numeric
 
S

Sean Timmons

When you change to .CSV, Excel reformats each field as it deems fit. You
could either add a ' prior to each number or format as text after conversion,
then add leading 0's...
 
D

David Biddulph

I would be willing to be that the zeroes are *not* lost when you save as
CSV. Open your CSV file in something like Notepad and check.

My guess is that you have subsequently allowed Excel to open the CSV file,
using its default options. In that case, Excel will treat the values as
numbers, not text, and Excel does not store the leading zeroes. If you do
want to read the CSV file with Excel, use Data/ Import External Data, and
specify the relevant columns as text.
 
Top