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>
From: "Meadows, Jeremy" <JMeadows@ALLDATA.NET>
Subject: Re: .csv --> Excel ..leading zeros dropped
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
|