BookmarkSubscribeRSS Feed
pinklemon
Calcite | Level 5


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!

2 REPLIES 2
Cynthia_sas
SAS Super FREQ

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 2030 views
  • 1 like
  • 2 in conversation