BookmarkSubscribeRSS Feed
StevePfromAZ
Fluorite | Level 6

I've got HTML tables (Proc print, means etc.) generated from SAS batch jobs (Windows Server) that I can right click and select download to Excel and the data exports perfectly!

When I do the same with an HTML table generated from the SSPWA, it gives me an Excel query error and doesn't export the data.

I've compared the (view source) source generated from both methods and they seem identical right down to the number of lines.

Anyone know why I can't download an HTML table to Excel generated from the SSPWA?

Pretty frustrating.

Thank you.

6 REPLIES 6
Quentin
Super User

I'm confused....

1.  When you say you have html files that you can right click and select "download to Excel", what do you mean?  You mean in Windows explorer you can right-click the file and select download to Excel?  Or do you mean in Internet explorer you can view an .html file with a table in it, and right-click the table and select download to Excel? Or something else?

2.  You have two .html files (one produced by your batch job which works as you want, and one produced by SPWA which doesn't work as you want).  If you diff those two files, they are exactly the same?   

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.
StevePfromAZ
Fluorite | Level 6

To clarify, using HTML files (tables) created from sas batch jobs, in Internet Explorer I can RMB and there is an option to download to Excel and it works.

In a HTML file (tables) created from SPWA, in Internet Explorer I can RMB and there is an option to download to Excel and it doesn't work. Same coded used in batch job was converted to a stored proc and executed from SPWA.

Viewing the source code from IE, show they are the same.

Steve

Quentin
Super User

I googled "Internet Explorer" and "Export to Excel"  (which is the RMB option I have in IE 😎 and found plenty of  complaints about this IE feature being buggy:

  http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/internet-explorer-9-error-export-to-micros...

So would suggest you check the IE support boards for your version of IE, bitness, etc (or try SAS support, as Cynthia suggested).

If the goal is to use SPWA to generate an Excel file (or Excel-like file), you could so that in other ways, e.g. writing results with destination as tagsets.excelxp or something else Excel is happy to open.


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.
StevePfromAZ
Fluorite | Level 6

Thanks Quentin, seems odd that I can without errors export from the SAS batch generated HTML pages always, and not at all when they are generated from SPWA. I'll have to follow-up this issue with SAS TS I guess.

Steve.

Quentin
Super User

Note that what you are seeing is consistent with the issue described in the link I posted:

When I attempt to use this facility [RMB -> export to Microsoft Excel] from any "http://" sites, the resulting "New Web Query" dialog that is presented by Excel shows an
  Address of http:/// and displays a standard browsing error of "This program cannot display the webpage". However this facility still works fine for any local [html] files that I load directly into the browser.

So my money is on IE bug, not SAS bug.

Note if you follow the thread, it's 2 years of people complaining about this being broken in IE9, followed by one post in 2013 saying it seemed to work for them in IE10.

Please post if you or tech support come up with a solution or definitive diagnosis.  I never knew IE had this feature.  Could be useful, if it can be made to work reliably.

--Q.

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.
Cynthia_sas
SAS Super FREQ

Hi:

  Sometimes with the SPWA you have to send a content-type header and use the STPSRV_HEADER to make that happen in your program. Like Quentin, however, I don't exactly understand the scenario you are describing. EG would let you RMB and then do a send to Excel, but the SPWA doesn't do that with Stored Process results. It might be better if you worked with Tech Support on this. Working with Stored Processes and the Platform and the SPWA might mean your Stored Process needs some tweaking, which means that someone has to look at ALL your stored process code and output to see why it is (allegedly) behaving differently than the other code and output.

cynthia

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
  • 6 replies
  • 2092 views
  • 0 likes
  • 3 in conversation