After the recent upgrade to SAS 9.4 M5 the following code does not produce an excel workbook with the output on separate sheets. Prior to the upgrade this worked fine.
ods excel file= "outputfile.xlsx" options (sheet_name= "Screen Fails" sheet_interval= "none);
proc report data= screenfails;
...
run;
ods excel options (sheet_name= "A5 Subjects" sheet_interval= "none");
proc report data= a5subjects;
...
run;
ods excel options (sheet_name= "A6 Subjects" sheet_interval= "none");
proc report data= a6subjects;
...
run;
ods excel close;
Thank you for assisting me.
this
ods excel file= "outputfile.xlsx" options (sheet_name= "Screen Fails" sheet_interval= "none);
should be this
ods excel file= "outputfile.xlsx" options (sheet_name= "Screen Fails" sheet_interval= "none");
I made a typo. That is not the problem I'm trying to solve.
Hi:
I assume the missing quote in the first Options was a typing error?
I believe that with 9.4M5, you need to use sheet_interval="now", as shown below:
ods excel file='c:\temp\testsubopt_now.xlsx'
options(sheet_name="one" sheet_interval='none');
proc print data=sashelp.class(obs=3);
run;
proc print data=sashelp.shoes(obs=3);
run;
ods excel options(sheet_name="two" sheet_interval="now");
proc report data=sashelp.prdsale;
column country region actual predict;
define country / group page;
define region / group;
break after country / summarize page;
run;
ods excel options(sheet_name="three" sheet_interval="now");
proc print data=sashelp.heart(obs=10);
run;
ods excel close;
Hope this helps,
cynthia
This is really help for multiple tables on multiple sheets!
I encounter this when using ods excel to export multiple datasets to a workbook but without contens after set "ods select noe;"
Try to use the following the options, it works for me.
ods exclude all;
ods exclude none;
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.