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 🙂
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.