BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi
I have requirement to export report output to excel using the below piece of code as a Stored Process at runtime
I have Microsoft office 2007.
/**************************************/
%global _odsdest _odsoptions ;
%let _odsdest = tagsets.excelXP;
%let _odsoptions =;
%let rv = %sysfunc(appsrv_header(Content-type,application/vnd.ms-excel));
%stpbegin;
proc print data=sashelp.class;
run;
%stpend;
/**************************************/
So Kindly let me know whether it is supported or not or there is any other alternative
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
The APPSRV_HEADER function was designed for use with SAS/IntrNet. The STPSRV_HEADER function is the one to use for stored processes. I have never used a %LET statement and %SYSFUNC to change the value of the the content-type header, so I can't comment on whether that is appropriate or not.

The only thing I can tell you is that if you use the tagsets.ExcelXP destination, you are creating a stored process that can only be executed in/from a limited number of client applications. You can execute this SP from the Portal, from the Stored Process Web Application (via URL). You could execute this from a custom front end -- JSP or whatever.

You MAY be able to execute this SP from within EG; however you will NOT be able to execute this SP from within the SAS/Addin for Microsoft Office. Word only "accepts" HTML, RTF or SASReport XML results from a SP; Excel only "accepts" HTML, CSV or SASReport XML results from an SP; and PPT only "accepts" SASReport XML from an SP.

There have been several examples of using STPSRV_HEADER with stored processes that have already been posted to this forum. You should be able to find them with a search on STPSRV_HEADER in the forum search box.

cynthia

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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