The SAS Output Delivery System and reporting techniques

The file you are trying to open ...

Reply
Super Contributor
Posts: 291

The file you are trying to open ...

Upon output of a file using the syntax below:

ods msoffice2k file='\\SharePoint\filename.xls' style=mytheme;

and then accessing via a link in an email message, users always see the message in the attached capture.png.

How can this message be avoided / eliminated?

Thanks,

Bill



   
 
 
 
 
 
 
 
 
 
 
 





Attachment
Respected Advisor
Posts: 3,062

Re: The file you are trying to open ...

Try this:

ods msoffice2k file='\\SharePoint\filename.xml' style=mytheme;

Valued Guide
Posts: 3,206

Re: The file you are trying to open ...

Specify the correct type with your attachment. Your xls file is not a xls file but an xml file that Excel can process.

http://support.sas.com/resources/papers/proceedings13/340-2013.pdf (content type adjustment attachments)

---->-- ja karman --<-----
Super Contributor
Posts: 291

Re: The file you are trying to open ...

Using the XML file extension produces the same result as the xls extension. Are there any other possibilities?

Thanks,

Bill

Frequent Contributor
Posts: 84

Re: The file you are trying to open ...

Can you use ods tagsets.excelxp?  I think that msoffice2k tagset outputs an html\htm file, but that will open in like chrome or explorer by default.  I'm guessing.     

SAS Super FREQ
Posts: 8,718

Re: The file you are trying to open ...

hi:

  ODS MSOFFICE2K creates an HTML file (not an XML file). So the MSOFFICE2K FILE= option should have an extension of .HTM or .HTML.

cynthia

Super Contributor
Posts: 291

Re: The file you are trying to open ...

Thanks Cynthia, but with htm or html, the file opens in a browser.

I do want it to open in Excel, preferably without the message. Since I'm filling the Excel file with proc tabulate output, ods would seem to be the easiest (or only?) option. Users will just have to put up with the warning message.Smiley Happy

Frequent Contributor
Posts: 84

Re: The file you are trying to open ...

If you can change your ods from msoffice2k to excelxp, you'll get around it.

Super Contributor
Posts: 291

Re: The file you are trying to open ...

Indeed, you are correct. Unfortunately, it does not like the ods "style" that I've applied.  Users will just have to put up with the warning message.Smiley Happy

Frequent Contributor
Posts: 84

Re: The file you are trying to open ...

Like others mentioned, your output is really .XML, if you change the extension to that you'll not get the error.  You can also turn off the error by changing extensionhardening in the windows registry, but that's tough to implement enterprise wide.     

Ask a Question
Discussion stats
  • 9 replies
  • 718 views
  • 0 likes
  • 5 in conversation