The SAS Output Delivery System and reporting techniques

Create excel spreadsheet with different results on sheets in spreadsheet

Accepted Solution Solved
Reply
Contributor
Posts: 71
Accepted Solution

Create excel spreadsheet with different results on sheets in spreadsheet

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.


Accepted Solutions
Solution
‎07-17-2012 11:56 AM
SAS Super FREQ
Posts: 8,743

Re: Create excel spreadsheet with different results on sheets in spreadsheet

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


All Replies
Solution
‎07-17-2012 11:56 AM
SAS Super FREQ
Posts: 8,743

Re: Create excel spreadsheet with different results on sheets in spreadsheet

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

Contributor
Posts: 71

Re: Create excel spreadsheet with different results on sheets in spreadsheet

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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