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

I have a dataset which contains diagnosis information. Specific diagnoses were assigned into different groups. I wanted to create an excel document that listed all the diagnoses within each of the different groups, but I wanted each group to have its own unique sheet. I know that in proc report you can specify that there be a page break based on a variable - I essentially want to do the same thing in excel except for instead of being a page break there is a new sheet.

I appreciate any help anyone can give. Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ

Hi:

  If you use ODS TAGSETS.EXCELXP, you can automatically create multi-sheet workbooks. In particular, the default with TAGSETS.EXCELXP destination is to create a new sheet for every table. Since PROC REPORT with the PAGE option creates a new table for every page variable, that means you would get a new sheet for every PAGE break.

  There have been many previous forum postings on the use of ODS TAGSETS.EXCELXP to create multi-sheet workbooks. Many of the postings have code examples. I'd suggest you start by searching the forum for some previously posted examples.

cynthia

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

Hi:

  If you use ODS TAGSETS.EXCELXP, you can automatically create multi-sheet workbooks. In particular, the default with TAGSETS.EXCELXP destination is to create a new sheet for every table. Since PROC REPORT with the PAGE option creates a new table for every page variable, that means you would get a new sheet for every PAGE break.

  There have been many previous forum postings on the use of ODS TAGSETS.EXCELXP to create multi-sheet workbooks. Many of the postings have code examples. I'd suggest you start by searching the forum for some previously posted examples.

cynthia

HyunJee
Fluorite | Level 6

Thank you Cynthia. I had not previously used the ODS tagsets before. Thanks again.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 954 views
  • 0 likes
  • 2 in conversation