Reputation: 77
I am trying to get the output onto a single excel spreadsheet but from my code it creates 3 different sheets within my excel spreadsheet.
data weight_club;
input IdNumber 1-4 Name $ 6-24 Team $ StartWeight EndWeight;
Loss=StartWeight-EndWeight;
dataline;
1023 David Shaw red 189 165
1049 Amelia Serrano yellow 145 124
1078 Ashley McKnight red 127 118
1219 Alan Nance red 210 192
1246 Ravi Sinha yellow 194 177
;
run;
ods listing close;
ods tagsets.excelxp file="C:\Users\xycb\Documents\SAS\base_step guide\test.xls" style=sansPrinter;
ods tagsets.ExcelXP options ( sheet_name='D2D' frozen_headers='1' /*autofilter='yes' sheet_interval='default'*/
absolute_column_width="40,40,5,5,8, 10,11,5,5,15, 12,12,12,12,12, 12,5,10 " center='left');
proc print data=weight_club noobs;
by IdNumber Name Team StartWeight EndWeight ;
id IdNumber Name Team StartWeight EndWeight ;
run;
ods tagsets.excelxp close;
ods listing ;
I was assuming this has something to do with the options set within the tagsets.excelxp. Any help would be greatly appreciated!
Upvotes: 1
Views: 91
Reputation: 2240
Using ODS does have different options. But if you don't need them you can use proc Export. You would of course need to define your dataset first to match your variable selection and sort options that you used.
PROC EXPORT DATA= WORK.TEST
OUTFILE= "C:\Users\xycb\Documents\SAS\base_step guide\test.xls"
DBMS=EXCEL REPLACE;
SHEET="tab1";
RUN;
If you look at the help for Proc Export there are many many options there too.
Upvotes: 0