Hi,
Anyone knows how to eliminate the warning below without revising the sas program?
The file you are trying to open, Data.xls, is in a different format than specified by the file extension. Verify that the file is not corrupted and is from a trusted source before opening the file. Do you want to open the file now?
As per research, the warning message is a user-notification function that was added to Excel 2007. I believe this is an added security from Microsoft.
Since we just upgraded from Microsoft Office 2003 to 2007, it was only now that we encounter this warning message. It is very troublesome since most of the programs we have make use of ODS HTML to output .xls file.
I am hoping there is other way or option in SAS that we can use to resolve this?
Thanks in advance!
Hi:
If you search support.sas.com for part of the text of that message from Excel, you will find a Tech Support note that explains the registry setting change you would have to make to get rid of that message.
When you name the file created by ODS HTML with a .xls extension, you are NOT creating a true, binary Excel file. You are merely fooling the Windows registry into launching Excel when you double click on the file name. You can prove this to yourself by opening the file you just created with Notepad and you will observe HTML tags in the file.
These are your alternatives to avoid that message:
1) name the file .HTML and open the file with an Excel File--> Open
2) continue to use the .xls file extension and make the registry setting to make Microsoft Happy
3) continue to use the .xls file extension and educate your users to just click Yes when they get that message
4) name the file .HTML, write the file to an "intermediate" directory, then have your system folks read that folder every xx hour or so, open each HTML file and use a VBA script to do a save to proprietary Excel format and write to a "final" directory where the users can get the files.
cynthia
Thank you, Cynthia!
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.