The SAS Output Delivery System and reporting techniques

ODS Excel - command an additional worksheet

Accepted Solution Solved
Reply
Contributor
Posts: 53
Accepted Solution

ODS Excel - command an additional worksheet

Hello

I'm using Enterprise Guide 7.1 (32bit) on a windows 10 PC.    

The difficulty I have is controlling when a new worksheet is to be created, particularly when I want the worksheet to contain multiple procedures, so SHEET_INTERVAL='Proc' is no good for me.

What I'm finding is the following:

  • SHEET_INTERVAL='NOW' generates an error message and doesn't seem to be valid.
  • SHEET_INTERVAL='none' doesn't seem to work if used for two successive worksheets.

 

All insights into this are welcome, I look forward to your input.

RB1



ods listing close;
ods results off;

* Open the workbook and start the first worksheet. ;
ods Excel file = "C:\.....\Test.xlsx" 
	style=htmlblue
	options(
		sheet_name = "One Proc" 
		);

proc print data=sashelp.cars;
run;


* Commence a second worksheet with multiple print procedures contained within it. ;
ods Excel 
	options(
		sheet_name = "Two Procs" 
		sheet_interval='none'
		);

proc print data=sashelp.class;
run;


proc print data=sashelp.classfit;
run;


* A third worksheet with two printing procedures.  NOW or NONE or omitted SHEET_INTERVAL do not work as I expected, 
 resulting in the second worksheet containing 4 print outputs.;
ods Excel 
	options(
		sheet_name = "Two more Procs" 
/*		sheet_interval='now'*/
		sheet_interval='none'

		);

		proc print data=sashelp.class;
		run;

		proc print data=sashelp.fish;
		run;


ods excel close;
ODS LISTING;

Accepted Solutions
Solution
‎11-24-2017 04:48 AM
Super User
Posts: 20,731

Re: ODS Excel - command an additional worksheet

[ Edited ]
Posted in reply to RB1Kenobi

This is a known issue. The solution is on here (I posted it) but it's originally from an ODS EXCEL blog post by Chris Hemidinger. I'm off to meetings, but if you don't find the response, post back and I can help you find it later on. 

 

https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-excel-amp-multiple-sheets/td-p/261953

 

View solution in original post


All Replies
Solution
‎11-24-2017 04:48 AM
Super User
Posts: 20,731

Re: ODS Excel - command an additional worksheet

[ Edited ]
Posted in reply to RB1Kenobi

This is a known issue. The solution is on here (I posted it) but it's originally from an ODS EXCEL blog post by Chris Hemidinger. I'm off to meetings, but if you don't find the response, post back and I can help you find it later on. 

 

https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-excel-amp-multiple-sheets/td-p/261953

 

Contributor
Posts: 53

Re: ODS Excel - command an additional worksheet

Thanks!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 209 views
  • 0 likes
  • 2 in conversation