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
Diamond | Level 26
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)

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1816 views
  • 1 like
  • 3 in conversation