Leading zero lost when saving .csv file

L

lskett

Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Power PC

I am creating an address book in Excel to be uploaded to a BlackBerry (via BB's application). The Zip Code column was formatted to TEXT and each zip with a leading zero begins with an apostrophe ('). I save the file as .csv. The zero is gone when I reopen the file. What else can I do to preserve the leading zeroes?
 
J

JE McGimpsey

Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Power PC

I am creating an address book in Excel to be uploaded to a BlackBerry (via
BB's application). The Zip Code column was formatted to TEXT and each zip
with a leading zero begins with an apostrophe ('). I save the file as .csv.
The zero is gone when I reopen the file. What else can I do to preserve the
leading zeroes?

If you're saving as .csv and your zip codes are text, then the csv file
will have the leading zeros.

You can verify that by opening the file with TextEdit.

I suspect you're seeing the "disappearance" of the zeros when you open
the file with XL - XL's parser will read the values as numbers since csv
by definition has no formatting information.

One way to have XL treat them as text:

Open the file using Data/Get External Data/Import Text File. Choose
Delimited, Comma, and in the third pane of the wizard, select the zip
code column and click the Text radio button.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top