Hi,
I would like to stream output from a stored process to multiple excel files for multiple datasets.
I've tried this for one dataset: 40683 - Streaming output from a SAS® Stored Process to Microsoft Excel
This works fine for one dataset to one excel file.
Is it possible to do this in one stored process for multiple datasets to multiple excel files via the excel popup window?
Thanks in advance.
Regards,
Berry
Web browsers cannot handle downloading multiple files at once.
The MIME headers that are set using the STPSRV_HEADER function are sent to the Web browser before the data stream. The browser interprets the headers and then determines what to do with the data stream that follows. You cannot send multiple MIME headers between data streams, meaning in your case, you can only open a single output stream using Excel. This is standard HTTP behavior and is not an issue with SAS.
Vince DelGobbo
SAS R&D
Web browsers cannot handle downloading multiple files at once.
The MIME headers that are set using the STPSRV_HEADER function are sent to the Web browser before the data stream. The browser interprets the headers and then determines what to do with the data stream that follows. You cannot send multiple MIME headers between data streams, meaning in your case, you can only open a single output stream using Excel. This is standard HTTP behavior and is not an issue with SAS.
Vince DelGobbo
SAS R&D
Thank you.
Very clear answer.
Regards,
Berry
You can create multiple Excel reports in one stored process request and return an HTML page that uses the replay program to allow the user to download the files one at a time.
Here is the doc to the replay program:
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.