So I have been looking at this issue over and over and I am still not 100% sure how to get this to work. I have 7 data sets that I need to place on one Excel sheet (sorta like a template). I understand with ODS how to put these on separate sheets, but not sure how to put these all on one spreadsheet.
Thanks for any guidance on this.
Hi:
Look for previous postings about the use of ODS EXCEL and the (sheet_interval='none') suboption.
Here's a quick example using just a few rows out of 3 different datasets.
ods excel file='c:\temp\all_together_now.xlsx'
options(sheet_interval='none');
proc print data=sashelp.class(obs=3);
run;
proc print data=sashelp.cars(obs=3);
var make model type enginesize msrp invoice;
run;
proc print data=sashelp.shoes(obs=3);
var region subsidiary product sales inventory returns;
run;
ods excel close;
Hope this helps,
Cynthia
Hi:
Look for previous postings about the use of ODS EXCEL and the (sheet_interval='none') suboption.
Here's a quick example using just a few rows out of 3 different datasets.
ods excel file='c:\temp\all_together_now.xlsx'
options(sheet_interval='none');
proc print data=sashelp.class(obs=3);
run;
proc print data=sashelp.cars(obs=3);
var make model type enginesize msrp invoice;
run;
proc print data=sashelp.shoes(obs=3);
var region subsidiary product sales inventory returns;
run;
ods excel close;
Hope this helps,
Cynthia
Thank you Cynthia, that sheet_interval=none was the piece I was missing. Do you know if it is possible to direct SAS where to place the data on the sheet? That was also something I saw a few articles about, but was confused how to implement.
Appreciate your help on this, now I can be more SAS dangerous 🙂
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.