0

I have csv file which contains data 0001,0002,0003

When I open this file in excel, starting nulls are removed

Its possible to save starting nulls at opening file in excel ?

1
  • Are you asking about nulls as in " " (a space) or as in leading zeros? Commented Apr 22, 2013 at 15:52

2 Answers 2

3

To do this, open Excel first.

Click on Data > Import from text.

You will get a window where you'll have to pick the import type. Choose Delimited then next.

In the next screen, check only comma, then next.

On this screen, click the first column in the preview box, scroll to the last column. Hold SHIFT and click the last column. This should make all the columns 'black' (you actually selected all the columns).

Now, click the radio button Text. After that, click Finish and OK to get your data as you wanted it to be!

1

If you are able to control the generation of your CSV file, you can force Excel to interpret the input as text by saving it as follows:

="0001",="0002",="0003"

(Be careful that you use typewriter quotes, as above, rather than curly [smart] quotes.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .