BookmarkSubscribeRSS Feed
SM8
Obsidian | Level 7 SM8
Obsidian | Level 7

How can I use SAS to produce an Excel report with the following included in the report:

• Tabs for each business: BM part A, BM part b, BJ part a , BJ part b, and SSB 
• Case specific information: IDN, BSN, Doc_ID
• Date (dt) Ranging from  3/1/20 – 3/30/20

 

I'm new to SAS, but I do believe SQL would be easiest to complete this. Any advice/suggested code would be helpful. Thanks!

2 REPLIES 2
Kurt_Bremser
Super User

PROC REPORT has most, if not all options you need, and ODS EXCEL will give you control over sheet changes and sheet names (among others).

 

For detailed help, provide example data in usable form (data step with datalines), and an example for the expected result in Excel.

Cynthia_sas
SAS Super FREQ

Hi:

  Here's something to get you started. You could use SQL to generate the macro variables that I show with %LET statements in my program:

Cynthia_sas_0-1591832532994.png

 

  But I think that PROC REPORT gives you the most flexibility as far as using dynamic information for the sheet names, titles and table captions using the LINE statement.

 

  Cynthia

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 551 views
  • 1 like
  • 3 in conversation