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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1272 views
  • 0 likes
  • 2 in conversation