Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - have a csv file retain leading zero

Status
Not open for further replies.

puppet

IS-IT--Management
Dec 13, 2001
140
0
0
I have a .csv file that I create from an external application. If I open the file in notepad I can see that the first column numbers are similar to:

078563259
045896512

But when opened in Excel I lose the leading zero:

78563259
45896512

How can I prevent this from happening?
 
if they're all nine digit numbers you could custom format the worksheet as '000000000'before you import. i also vaguely recall a way to do this with text to columns but i'll have to go and find it.
 
If these are all phone numbers then if you leave a space between the dialing code and the number then the 0's will stay in place

Ray
 
Import them as a text instead of a number. When you do the text to columns command, you can select the format for each column. Using the wizard, in step three select the column, then click the "text" radio button in Column data format. Imagineer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top