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
Try this:
ods msoffice2k file='\\SharePoint\filename.xml' style=mytheme;
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)
Using the XML file extension produces the same result as the xls extension. Are there any other possibilities?
Thanks,
Bill
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.
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
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.
If you can change your ods from msoffice2k to excelxp, you'll get around it.
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.
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.
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.
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.