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.

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1123 views
  • 0 likes
  • 3 in conversation