Jump to content

Help - CSV file drops Leading Zeros in Zip Code!


lmfarwick

Recommended Posts

I am running into a problem when I save an Excel mailing list as a CSV file to import to the FusionPro template. Excel drops the leading zero for zip codes on the east coast. For instance Rhode Island zip code 02860, would save as 2860 in the CSV file. :confused:

 

Can anyone help with a rule to detect 4 digit zip codes and add a preceding zero? Also, could the rule detect a zip+4 code and still add the leading zero?

 

This would really help alleviate our manual work of merging the docs. Thank you in advance for any ideas, suggestions or solutions!

Link to comment
Share on other sites

The easiest thing to do would be to go into excel and change the "zip code" column to "text" instead of "number" that way the leading zero stays intact.

 

If that's not an option, give this a shot:

return FormatNumber("00000", Field("YourZipCodeFieldNameHere")); 

Link to comment
Share on other sites

If you fix it in Excel as noted above, don't open the .csv in Excel to check to see if it worked - for some reason, Excel will still appear to drop the leading zero. To check it out, open the fixed .csv in a text editor and you'll be able to see your leading zeroes.
Link to comment
Share on other sites

Thank you step and DCurry! I have been opening the csv file in excel and the leading zeros were missing. When I open it in notepad I can see the zeros are maintained! That's awesome. I will also use a rule in the template to safeguard our large group of users against the same problem.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...