LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 18 Jun 2002 11:47:47 -0400
Reply-To:     "Meadows, Jeremy" <JMeadows@ALLDATA.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:     To: "Goldman, Brad (AT-Atlanta)" <Brad.Goldman@AUTOTRADER.COM>
From:         "Meadows, Jeremy" <JMeadows@ALLDATA.NET>
Subject:      Re: .csv --> Excel ..leading zeros dropped
Comments: To: SAS-L@LISTSERV.VT.EDU
Content-Type: text/plain; charset="iso-8859-1"

Format the cells as zip_codes, which can be found under the 'custom' option in Format Cells

-----Original Message----- From: Goldman, Brad (AT-Atlanta) [mailto:Brad.Goldman@AUTOTRADER.COM] Sent: Tuesday, June 18, 2002 11:35 AM To: SAS-L@LISTSERV.VT.EDU Subject: .csv --> Excel ..leading zeros dropped

Thanks to Mr. Crawford and co., I create my .csv file. One of the fields is (for example) a zip code. In the .csv file, it is represented as 02173. This is put out to our intranet site. Users click on the link to the .csv file, and it is interpreted as an Excel file. However, the zip code loses any leading zeros, and gets represented as 2173.

How can I represent the zip value in the .csv file so Excel will keep the leading zeros? I've tried '02173, '02173', "'02173", "02173", ""02173"" and about a billion other variants, all come back as 2173.

Note that this is not a SAS problem, I can get SAS to create the .csv file with whatever I need it to. I only ask it here because y'all are omniscient :) . It is not a "within Excel" problem either. I am not the user, I am putting it out for other users, so it must be default behavior when Excel interprets, not post-formatting.

Any help appreciated, -Brad


Back to: Top of message | Previous page | Main SAS-L page