DATA Step, Macro, Functions and more

Macro to create multiple sheet excel spread sheet

Accepted Solution Solved
Reply
Contributor
Posts: 43
Accepted Solution

Macro to create multiple sheet excel spread sheet

Does anyone have macro to create multiple sheet excel spread sheet report ?

Here is what I’m looking for.

Specify dataset names , list of columns and   title statements and I will create multiple sheet for each table.   Is it even possible?


Accepted Solutions
Solution
‎09-26-2014 05:23 PM
Super User
Posts: 17,840

Re: Macro to create multiple sheet excel spread sheet

Yes, if you have SAS 9.4 use ODS Excel.

If 9.3 or less try ODS Tagsets.ExcelXP

The demo has two examples, one data driven, one manual. This creates an XML file, not a native Excel file, but Excel will be able to read the file properly.

Base SAS: Demo: ExcelXP Tagset and Microsoft Excel

View solution in original post


All Replies
Solution
‎09-26-2014 05:23 PM
Super User
Posts: 17,840

Re: Macro to create multiple sheet excel spread sheet

Yes, if you have SAS 9.4 use ODS Excel.

If 9.3 or less try ODS Tagsets.ExcelXP

The demo has two examples, one data driven, one manual. This creates an XML file, not a native Excel file, but Excel will be able to read the file properly.

Base SAS: Demo: ExcelXP Tagset and Microsoft Excel

Contributor
Posts: 43

Re: Macro to create multiple sheet excel spread sheet

Do you have example macro?

Super User
Posts: 17,840

Re: Macro to create multiple sheet excel spread sheet

WWhy a macro? There's example code in the link.

☑ This topic is SOLVED.

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

Discussion stats
  • 3 replies
  • 301 views
  • 0 likes
  • 2 in conversation