Using ODS EXCEL in a stored process in the SAS® Add-In for Microsoft Office


Beginning with release 8.0, the ODS EXCEL destination is supported in the SAS Add-In for Microsoft Office with the following requirements:

Sample ODS EXCEL stored process code:

*Process Body;
 
%let _odsdest=EXCEL;
%let _odsoptions=;
 
%stpbegin;
ods EXCEL options(sheet_interval="proc" sheet_name="Male Students"); 
proc print data=sashelp.class(where=(sex="M")); 
run; 
ods EXCEL options(sheet_name="Female Students"); 
proc print data=sashelp.class(where=(sex="F")); 
run; 
ods EXCEL close; 
%stpend;
 

Note: You cannot refresh a Microsoft Excel file that is created from a stored process containing ODS Excel code that is executed in the SAS Add-In for Microsoft Office.