BookmarkSubscribeRSS Feed
Bill
Quartz | Level 8

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



   
 
 
 
 
 
 
 
 
 
 
 






Capture.PNG
9 REPLIES 9
SASKiwi
PROC Star

Try this:

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

jakarman
Barite | Level 11

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 --<-----
Bill
Quartz | Level 8

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

Thanks,

Bill

wcp_fnfg
Obsidian | Level 7

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.     

Cynthia_sas
SAS Super FREQ

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

Bill
Quartz | Level 8

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

wcp_fnfg
Obsidian | Level 7

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

Bill
Quartz | Level 8

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

wcp_fnfg
Obsidian | Level 7

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.     

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
  • 9 replies
  • 1536 views
  • 0 likes
  • 5 in conversation