Hi Team, We are trying to provide an options to generate the RTF, PDF and Excel file using STP. We are able to generate an output in RTF and in PDF format, but while trying to generate the Excel file the STP is giving the _webout related error, attached log file and below is the code snippet.
How are you calling the STP? From EG, a web browser, Excel?
If you are calling it from a web browser I'd suggest setting to `stream` output and removing the automatic `%STPBEGIN;` / `%STPEND;` macros. This will ensure that any output sent to the `_webout` fileref will be received 'cleanly' by the client. If downloading files then you will also have to set the http headers, eg:
data _null_;
rc = stpsrv_header('Content-type','application/excel');
rc = stpsrv_header('Content-disposition',"attachment; filename=myfile.xls");
run;
Attached log file.
How are you calling the STP? From EG, a web browser, Excel?
If you are calling it from a web browser I'd suggest setting to `stream` output and removing the automatic `%STPBEGIN;` / `%STPEND;` macros. This will ensure that any output sent to the `_webout` fileref will be received 'cleanly' by the client. If downloading files then you will also have to set the http headers, eg:
data _null_;
rc = stpsrv_header('Content-type','application/excel');
rc = stpsrv_header('Content-disposition',"attachment; filename=myfile.xls");
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.