View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
ChuckW
 
Posts: n/a
Default Saving a CSV file from Excel with 0 in front of Zip code

Hi,

Opening the file in notepad did the trick. I can now import this file into
my program.

Thanks for everyone's help.


--
Chuck W


"David Biddulph" wrote:

"ChuckW" wrote in message
...
"David Biddulph" wrote:

"ChuckW" wrote in message
...
Hi,

I am trying to import some addresses into UPS worldship software. I
need
it
in the form of a CSV file. It does not accept excel as an import
engine.
I
have several addresses with zip codes which start with zero. I am able
to
keep the zero in front of the zip code in Excel but when I go to save
it
as a
CSV file it drops the zero. Worldship then rejects the record since it
is
not a valid address. I need to find a way to have a zip code which
starts
with a zero saved as a CSV file. Can anyone help?


Is the leading zero really there in the data in Excel, or is it part of
the
cell formatting?


I think it is in there. When the zero's had been stripped out originally
I
inserted a column and added a zero to them. I then concatenated the two
columns. There is this green triangle in the upper left corner of all of
the
cells in the zip code field that start with a zero. When I click on it,
it
give me choices such as ignore error or convert to number. If I convert
it
to a number it strips off the zero so I chose ignore error. Does that
help?


In that situation (with green triangles showing in a text field), when I
produce a CSV, the leading zero is still there providing that I actually
read the CSV in something like Notepad. If I reimport the CSV into Excel it
will treat it as a number and lose the leading zero. Have you actually
looked at your CSV file with Notepad?

What format were the fields in Excel? Are you sure that that they were
text? [Do a Format/ Cells to check.]
--
David Biddulph