Hi Folks - I have an .xls file with a zip code column entered as text. I
need to send the file to the feds as a csv file. When I Save As the xls file
to a csv file, I lose the leading zeros in the zip code. Any ideas?
Michael
Carl - 31 Oct 2006 17:01 GMT
Have you tried formatting the entire column as text? I don't know if that will work, but give it a shot.
> Hi Folks - I have an .xls file with a zip code column entered as text. I
> need to send the file to the feds as a csv file. When I Save As the xls file
> to a csv file, I lose the leading zeros in the zip code. Any ideas?
>
> Michael
Carl - 31 Oct 2006 17:42 GMT
Also -- after you've created the .csv file, open it in Notepad *not* Excel. See if the leading zeros are there.
> Hi Folks - I have an .xls file with a zip code column entered as text. I
> need to send the file to the feds as a csv file. When I Save As the xls file
> to a csv file, I lose the leading zeros in the zip code. Any ideas?
>
> Michael
Gail - 02 Nov 2006 16:14 GMT
You need to save it as txt rather than csv. If you open the txt file, you
will be prompted on how to handle the columns on a column by column basis.
For the zipcode column, open as text.
With the CSV format, you have not truly lost the leading 0's, it is just
when you reopen it in Excel as the csv, the automatic assumption is General
and that drops the leading 0's
> Hi Folks - I have an .xls file with a zip code column entered as text. I
> need to send the file to the feds as a csv file. When I Save As the xls
> file to a csv file, I lose the leading zeros in the zip code. Any ideas?
>
> Michael
Michael - 03 Nov 2006 22:40 GMT
Hi Folks - Here's a follow-up ..... it turns out that Excel WAS saving the leading zero during the conversion from .xls to .csv. However, when Excel opened the .csv file, it converted the text field to a number field thus dropping the leading zero. Opening the .csv file with Notepad confirmed the proper .csv conversion. Thaks for everyone's help.
Michael
> You need to save it as txt rather than csv. If you open the txt file, you
> will be prompted on how to handle the columns on a column by column basis.
[quoted text clipped - 9 lines]
>>
>> Michael