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 (August 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 7 Aug 2009 06:15:44 -0700
Reply-To:     SS <shamindra.shrotriya@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         SS <shamindra.shrotriya@GMAIL.COM>
Organization: http://groups.google.com
Subject:      ODS HTML: Keep Leading Zeroes when exporting to Excel
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

Hi All,

I have been looking for a way to solve the problem of keeping leading zeroes when exporting SAS data to an Excel file.

There are many resources such as:

1.http://www.tek-tips.com/viewthread.cfm?qid=1355208&page=10 2. http://www.google.com.au/url?sa=t&source=web&ct=res&cd=9&url=http%3A%2F%2Fwww2.sas.com%2Fproceedings%2Fsugi28%2F012-28.pdf&ei=HSR8Sp2rB4iIkAXcxuT6Ag&rct=j&q=keep+leading+zeroes+ods+sas&usg=AFQjCNFR44oR5U1o2THTHmvkRK2alGIIqQ

I have constructed an example, but even this does not work:

/* Apply text format to all cells */ data one; input acc_no zipcode; cards; 0111 023560 0333 023334 ; run;

ODS HTML FILE="C:\test leading zeroes.xls" HEADTEXT="<STYLE> .zero {MSO-NUMBER-FORMAT:\@}</STYLE>"; TITLE; PROC PRINT DATA=one NOOBS; var acc_no / style={htmlclass="zero"}; RUN; ODS HTML CLOSE;

acc_no still outputs as "111" instead of "0111" for example.

Could anyone please explain where I am going wrong here?

Thanks


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