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!
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.
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:
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
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.