how to create a csv file with saving initial (leading) zeros

Copper Contributor

I am a user and not an expert.

How to make sure that leading (initial) zeros are not lost?
Example of a digit (data) in the format 001000001 (Word)
Excel
I write it in
Excel (.xlsx) - text 001000001
transform it into a format from .xlsx to csv.
And I get
Excel (csv) - 1000001
2 initial (leading) zeros are lost
is there an easy way?
Or do I need an additional program and which program?

1 Reply

@Andrew500 When you put an apostrophe before the digits or make sure that the column/range is formatted as text, the leading zeros are preserved in the csv file. You can check that by opening the file in a text editor.

However, when you open the csv file, e.g. by double-clicking it, Excel defaults to numbers and the leading zeros disappear. In stead, open the file from within Excel and a Text Import wizard should come up. Follow the instructions and make sure that in step 3, you select the data type for the column with the "numbers" as Text. Press Finish.