I'm having some problems with proc report and I'm not sure if that's where the problem lies or if it's possibly a SAS option somewhere. As an example, The code below should create an XLS file named filename.xls with two sheets in it. One called Summary, and the other called Detail. Instead, it is creating two XLS files, filename.xls which contains the Summary sheet, and filename1.xls which contains the Detail sheet.
I've used code similar to this many times before and haven't run into this issue. I've tried closing and reopening SAS, as well as rebooting my PC with no luck. Also, I've tried running other programs, that I know work, which contain similar proc reports, and now they all have this issue as well. Any idea what could be wrong?
ods listing close;
ods results off;
ods tagsets.excelxp file="c:\temp\filename.xls" style=ESGExcel
options(sheet_name='summary'
embedded_titles='yes'
embedded_footnotes='yes'
frozen_headers='1'
);
proc report data = ds1 missing nowindows;
columns OWN
ABR
BBR
;
label OWN = 'SOMETHING1'
ABR = 'SOMETHING2'
BBR = 'SOMETHING3'
;
define OWN /
style(header)={font=('calibri',10pt,bold) just=c}
style(column)={font=('calibri',10pt) just=c cellwidth=1.0in};
define ABR /
style(header)={font=('calibri',10pt,bold) just=c}
style(column)={font=('calibri',10pt) just=c cellwidth=1.0in};
define BBR /
style(header)={font=('calibri',10pt,bold) just=c}
style(column)={font=('calibri',10pt) just=c cellwidth=1.0in};
title;
run;
ods tagsets.excelxp style=ESGExcel
options(sheet_name='detail'
embedded_titles='yes'
embedded_footnotes='yes'
frozen_headers='1'
);
proc report data = ds2 missing nowindows;
columns BSN
LSQ
OWN
;
label BSN = 'SOMETHING1'
LSQ = 'SOMETHING2'
OWN = 'SOMETHING3'
;
define BSN /
style(header)={font=('calibri',10pt,bold) just=c}
style(column)={font=('calibri',10pt) just=c cellwidth=1.0in};
define LSQ /
style(header)={font=('calibri',10pt,bold) just=c}
style(column)={font=('calibri',10pt) just=c cellwidth=1.0in};
define OWN /
style(header)={font=('calibri',10pt,bold) just=c}
style(column)={font=('calibri',10pt) just=c cellwidth=1.0in};
title;
run;
ods tagsets.excelxp close;
ods listing;
ods results;
Solution: In desktop SAS, go to Tools > Options > Preferences. Under the Results tab, uncheck "Create HTML".