I'm trying to export a sas dataset which has numeric column names (eg, 010,020,030) like index. When I print this dataset the results tab displays them in same format. When I export the file using ODS/proc export, excel automatically changes the column names to 10,20,30 etc,. Is there a way to maintain the column headers as text.
I've tried ODS HTML and proc export. I also tried exporting the dataset as xml and tried opening it in excel. But Excel automatically changes it to a number.
data check;
'010'n=200;
'020'n=500;
'030'n=1000;
run;
options missing=0;
ODS HTML FILE="&output_loc./check.xls";
Title "check col names";
proc print data=check noobs style={textalign=left};run;
Title;
ODS HTML CLOSE;
options missing=.;
I expect the column names on the excel sheet to be 010,020,030. Can somebody help me on this?
010
etc? If the later is it ok if the cells contain can extra character, like 'A0'x that is normally invisible? – Tom