BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
UCFAngel
Obsidian | Level 7

We have been using the MSOFFICE2K tagset to generate and stream .xls files with _WEBOUT in a stored process. Although we received the dialog box warning that the format of the file is not as expected our users were okay with responding Yes.

 

However, after the most recent Microsoft Office 2013 updates were applied to all of our computers this doesn't work anymore. Excel does open when we select to open the file but all we get is a blank gray screen.

 

We are on SAS 9.4 M2 so ODS EXCEL is not fully supported. Any suggestions as to what may be happening after this update from Microsoft?

 

data _null_;

rc = stpsrv_header('Content-type','application/vnd.ms-excel');

rc = stpsrv_header('Content-disposition','attachment; filename=Dept_list_courses.xls');

run;

ODS LISTING CLOSE;

ODS tagsets.msoffice2k BODY=_webout style=seaside;

-proc report code follows-

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

1. Check your Trust Center settings

2. Try downloading a file and opening from within Excel - this isn't workable long term but if you get a warning or note it may help diagnose the problem

View solution in original post

3 REPLIES 3
Reeza
Super User

1. Check your Trust Center settings

2. Try downloading a file and opening from within Excel - this isn't workable long term but if you get a warning or note it may help diagnose the problem

UCFAngel
Obsidian | Level 7

I compared the Trust Center settings to those on a computer that does not have the update applied and they are the same.

 

I am able to save the file from the web, instead of open, and then open it successfully in Excel. Some users have said that it didn't work for them, however. This solution will work temporarily until we can upgrade to SAS 9.4 M3.

 

Thanks so much for your suggestions.

Cynthia_sas
SAS Super FREQ
Here's some more background. When you use MSOFFICE2K, you are not creating an Excel proprietary file just because you use an extension of .XLS and even with the Content-type header, Excel knows, when it goes to open the file that the "true" inner workings of the file are HTML and you are trying to "fool Excel" by naming the file XLS. Ever since Office 2007, you will get that snarky message from Excel when you try to open an HTML file that has been named as .XLS instead of .HTML. The only way to avoid the snarky message from Excel is to change the Windows registry, which is generally frowned upon or to do what you are doing and Save AS xls or just educate your users to click Yes when they get the message about the mismatch between the extension and the actual file contents.

cynthia
And, when you can use ODS EXCEL, you won't get that snarky message anymore. (something to look forward to)

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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