BookmarkSubscribeRSS Feed
FrankE
Fluorite | Level 6

Hi guys,  I have a stored process that takes several min to complete.  I found a paper (http://support.sas.com/kb/26/181.html)  that describes how to display a "Please Wait" message while the stored proc runs.  That works great!  My issue is that the output of my stored proc is an Excel workbook generated with the ExcelXP tagset, not HTML.  Using the linked sample results in the modified headers being ignored and my results are sent to HTML, not Excel.  Is there any way to display a "Please Wait" message while the stored proc is running, then use the headers to open a "Open/Save As" box for Excel? 

2 REPLIES 2
Lokraj
Calcite | Level 5

Hello Frank,

I have the same issue. Did you find the solution for that?

 

Lokraj

Quentin
Super User

I found this post from @boemskatsvery helpful:

https://communities.sas.com/t5/SAS-Stored-Processes/Stored-process-writing-to-the-browser-and-excelx...

 

And discussed more in this thread:

https://communities.sas.com/t5/SAS-Stored-Processes/Is-there-documentation-on-REPLAY-stored-process/...

 

My implementation of this is something like:

1. Have a stored process that produces an the Excel file (or whatever) and writes it to some temp space on the SAS server.

2. That server returns an html page which has the please wait message and and iframe.

3. The iframe invokes a second stored process (StreamResults) via URL which streams the Excel file back to the browser.

 

So basically, as I understand it, a browser cannot get receive both an html file and an excel file in one request from a web server, because you only have one header to define the content as html or excel.  So the workaround is to have the stored proces return an html file, and then that html file can invoke a second stored process (in an iframe) which delivers the excel file.

 

It takes a bit of work to set up, but it's been working well for me.

 

Hope that helps.

 

 

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 2 replies
  • 2182 views
  • 1 like
  • 3 in conversation