Tag Archive for Excel

Excel popup issue on opening csv file with extension xls

I am currently working on some files with csv data in a xls file, and Excel popup an alert everytime it tries to open it.

“The file you are trying to open, ‘[filename]’, 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?”

Clicking Yes simply open the file, and No to quit.

This annoying popup is “stealing” focus of windows and gives me problem on my scripts.

A bit of searching comes with a Registy edit to suppress this popup.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Excel\Security]
“ExtensionHardening”=dword:00000000

This works with Office 2010 and it solved my problem, kind of…

Link
MSDN Excel 2007 Extension Warning On Opening Excel Workbook from a Web Site: http://blogs.msdn.com/b/vsofficedeveloper/archive/2008/03/11/excel-2007-extension-warning.aspx