0

I am getting the following error warning when opening an .xls file generated using 'CarlosAg.ExcelXmlWriter.dll' in Excel 2007:

The file you are trying to open,'', 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?

Any ideas how I can resolve this?

1

4 Answers 4

1

It seems that the .xls file (Microsoft Excel 97-2003 format) is actually an .xlsx file (Microsoft Excel 2007 format). Changing the file extension from .xls to .xlsx should clear the warning message.

1

In your VBA code, use this command:

Application.DisplayAlerts = False

this will suppress any such warnings.

-1

It's xml spreadsheet 2003 format, the correct extension is xml which is why it does not need excel installed.

1
  • I think you meant to say .xlsx, not .xml?
    – SamB
    Commented Jan 13, 2014 at 5:51
-1

I tried changing the file extension to several extensions -- but the error always came up. I tried changing the settings in the registry -- but the error still appeared (I do not have admin rights and group policy probably overrides). I added [Application.DisplayAlerts = False] to my macro and it works!

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .