Zip Codes in CSV format

lnjsports

New Member
Joined
May 30, 2009
Messages
8
I do a lot of exporting of sales which exports in CSV format. When I save the CSV file, the zip codes with a preceding zero get removed. I have tried formatting the cell or column to custom zip code and 5 digit numbers. When I do this, the CSV does show the zip code correctly but when I save it, that format is lost.

I looked at the data in note pad after changing the format which it shows all 5 digits, but if I reopen that CSV after saving it, check with note pad, it removed the preceding zero.

The reason why I need a fix for this is because I submit data to my suppliers via CSV which I need to make sure that the zip codes are showing the preceding zero.

Any ideas on how to fix this problem?

Regards
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi

If you format the file (in Excel) as required and then save it as a csv file and close it, if you then open the file in Notepad, is the data present and correctly formatted?
 
Upvote 0
I just opened up a sample csv file, then saved it as Excel. Did the format to custom zip code, saved it as excel. Then I reopened it again, saved it CSV and closed it. Re-open the CSV and then saved as text.

It is showing only four zip code digits.
 
Upvote 0
Yes, but are you opening a csv file in Excel? You will always lose the leading zeros if you do this. The only way to check if the csv file contains the leading zeros is to open the file in Notepad or an equivalent text editor. Excel is not a text editor.

Excel should save the displayed formatting (ie with leading zeros) to the csv file but you cannot then open up the csv within Excel and expect the leading zeros to be returned I am afraid.
 
Upvote 0
Ok, so what is my best bet in this situation.

I export sales that are exported in CSV format. Once it exports, I have to do very minor edits which I want to then save it as an CSV.

Because I then have to send it to certain manufacturers for processing.

Also, when I open up any CSV, it is opened in a similar excel format but it is just called CSV. Could that be the problem?
 
Upvote 0

Forum statistics

Threads
1,225,962
Messages
6,188,083
Members
453,460
Latest member
darkwizdom42

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top