Skip to Content
author's profile photo Former Member
Former Member

Leading zeros in excel

Hi,

I am trying to load a flat file in .csv format but whenever I open the file I am losing the leading zeros. It is very cumbersome for me to do those changes in notepad.

Does one know how to keep the leading zeros even when I open in excel and edit and save? I changed the format of that column to text but if I close the file and next time I open the file, it is again back...

ANy suggestions please?

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 28, 2008 at 04:02 PM

    Hi,

    When you import the csv-file into excel, you can mark the column as being text (step 3 of 3).

    /Christian Frier

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 04:17 AM

    Hi,

    In excel, make the columns as text and save it. Then save as .csv format. But dont open the csv file becoz if you open, it will get its orginality back. So if you want to see whether it is in text format or not just open the csv file in notepad format. Now you can see leading zeros in the notepad. Without opening the csv file only, load the file.

    Regards,

    Bindu

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 04:29 AM

    Hi Just put ' before zeros and it will be alright.

    thanks

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.