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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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