Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS "Put" function for Leading zero exporting EXCEL or HTML 1

Status
Not open for further replies.

noway320

MIS
Aug 12, 2010
19
US
I am using put function for adding zero before the numeric Is there a way for it not to get lost when exporting to Excel or html?
 
This is a bug in Excel not SAS. I think that if you use the PROC EXPORT procedure you can get your leading zeros to show up.

Code:
data test;
 x= 7;
 y = put(x,z5.);
run;
proc export
    data = test
    outfile = "c:\temp\t1.xls"
    replace;
run;

I hope this helps you,
Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top