Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library > Formatting Text

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old November 18th, 2011, 11:56 AM
lmfarwick lmfarwick is offline
Forum n00b
 
Join Date: Apr 2009
Posts: 2
Question Help - CSV file drops Leading Zeros in Zip Code!

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.

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!
Reply With Quote
  #2  
Old November 21st, 2011, 04:17 PM
step's Avatar
step step is offline
Senior Contributor
 
Join Date: Jan 2010
Location: Charlotte, NC
Posts: 955
Default Re: Help - CSV file drops Leading Zeros in Zip Code!

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:
Code:
return FormatNumber("00000", Field("YourZipCodeFieldNameHere"));
__________________
Ste Pennell
FusionPro VDP Creator 9.3.15
Adobe Acrobat X 10.1.1
Mac OS X 10.12

LinkedIn
Reply With Quote
  #3  
Old November 22nd, 2011, 08:24 AM
DCurry DCurry is offline
Junior Community Member
 
Join Date: Jan 2009
Location: Baltimore, Maryland
Posts: 37
Default Re: Help - CSV file drops Leading Zeros in Zip Code!

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.
__________________
Dan Curry
FusionPro 6.2P1a • Acrobat 9.3.2 • OS X 10.6.4
Currently seeking prepress/VDP employment in the Baltimore area.
Reply With Quote
  #4  
Old November 22nd, 2011, 11:10 AM
lmfarwick lmfarwick is offline
Forum n00b
 
Join Date: Apr 2009
Posts: 2
Smile Re: Help - CSV file drops Leading Zeros in Zip Code!

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.
Reply With Quote
Reply

Tags
address format, zip code, zipcode

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:22 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.