BookmarkSubscribeRSS Feed
parametreSEG
Calcite | Level 5
I have to call a stored procedure from Excel.
The stored procedure generates multiple tables SAS.
I hope that when I call the stored procedure, each table opens in a different Sheet.
For the moment, all the tables are created in the same Sheet.

Thanks
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
At the present time, your stored process (SP) populates only one sheet. You cannot populate multiple sheets from a single stored process using the SAS Add-in for Microsoft Office (SAS-->Reports-->Select your Folder -->Select and Run your SP)

There is a way to generate a Spreadsheet Markup Language XML file (The Microsoft XML description of a workbook with multiple worksheets.) with SAS. In Base SAS, you use the TAGSETS.EXCELXP destination to create Microsoft-specific XML that can contain multiple worksheets in one workbook.

However, the SAS Add-in for Microsoft Office does not "recognize" this type of XML from a Stored Process. Your only choices for SP output when using the Add-in are SASReport XML, HTML or CSV. When you run an SP using the Add-in, the user gets a popup window asking them where they want the SP output to be placed. The design of the Add-in allows the user to make that choice -- and the SASReport XML or HTML or CSV results from the SP are placed according to that choice. So if you want the users to utilize the SAS Add-in for Microsoft Office to run the SP, then they'd have to run a separate SP or a make different choices for the same SP on a second, third, fourth worksheet using the Add-in to get a multi-sheet workbook.

If you use the Stored Process Web Application or write your ExcelXP XML results to a permanent package that can be retrieved by the user, then you could use TAGSETS.EXCELXP to create a multi-sheet workbook from your stored process.

For more help using the Stored Process Web Application or creating permanent packages and on overriding the default value for _ODSDEST in order to generate ExcelXP output (multi-sheet), your best bet for help is to read the Stored Process Web Application documentation or to contact Tech Support for help.

cynthia

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
  • 1 reply
  • 778 views
  • 0 likes
  • 2 in conversation