BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RB1Kenobi
Quartz | Level 8

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;
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

2 REPLIES 2
Reeza
Super User

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

 

RB1Kenobi
Quartz | Level 8
Thanks!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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