How do i save a csv file to keep leading zeros please?

G

Guest

nI wish to save a list of numbers that have leading zeros for use as data in
a notepad file. When i change the file from xls to csv it drops off the
leadibg zeros. I have tried formatting everything as text but when you save
to csv it changes the format back to general. Can you help please?There are
two fields in the data base
 
G

Guest

Put a single quote ' at the beginning of every cell containing text (this
includes your numbers with leading zeros). The single quote will be dropped
when the file is exported to .csv format, but the leading zeros will be
retained.

Hope this helps,

Hutch
 
G

Guest

Hi Tom,
Sorry to say this didn't work for me it did the same as before, dropping the
@ and the leading zeros, any other ideas? Thanks for helping.
Regards
Kingie
 
G

Guest

Are you checking by opening the .csv file in Excel? Excel will always, by
default, treat a value like 000034 as a number, not text. Open the .csv
file in Notepad or Wordpad, and I think you see that it did keep the leading
zeros. To open the file in Excel, first change the file extension from .csv
to .txt This will cause the Text Import wizard to launch. Using the wizard,
you can specify that it is a text field.

Regards,

Hutch
 
G

Guest

Hi Tom,
Thanks for your help, I now have two fields containing leading zeros. Will
try on the print programme at work tomorrow.
Thanks again best regards,
Kingie
 

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