BookmarkSubscribeRSS Feed
Sir_Highbury
Quartz | Level 8

Dear experts,

 

I have to report my data in 2 excel sheets, therefore I am usinf the option sheet interval = non but how can I move to the next sheet afterwards? I checke the forum and someone mentioned a bug, any news on it? Thanks a lot in advance for your support.

 

ods select all;
ods excel options(
sheet_interval="none"
suppress_bylines="yes"
sheet_label="sheet2"
embedded_titles="yes"
embed_titles_once="yes"
);
ods excel close

%include "W:\04-Programfiles\dashboard\monitoring_S02_claims_as-is_analysis.sas";

ods excel close
;run;

 

Best regards,

SH

2 REPLIES 2
Oligolas
Barite | Level 11

IMHO, with sheet_interval=none you can not create multisheet excel files. ODS EXCEL seems not to be as flexible as EXCELXP is, since it doesn't allow to switch or to display 2 tables on sheet and 1 table on the other.

 

Multisheets with one table can be created like this.

ods excel file="c:\example.xlsx"
options(
suppress_bylines="yes"
sheet_label="class"
embedded_titles="yes"
embed_titles_once="yes"
);
proc print data=sashelp.class (obs=5);run;
 
ods excel options(
suppress_bylines="yes"
sheet_label="only cars"
embedded_titles="yes"
embed_titles_once="yes"
);
proc print data=sashelp.cars (obs=5);run;
 
ods excel close;
________________________

- Cheers -

Reeza
Super User

@Oligolas You can create multi sheet and control it, but it's buggy right now.

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 753 views
  • 0 likes
  • 3 in conversation