Search code examples
excel-dna

Why can't Excel load the excel-dna addin?


The error is:

The file you are trying to open, 'ExcelDna.xll', is in a different format than specified by the
file extension. Verify that the file is not corrupt and is from a trusted source before opening the file.


Solution

  • Yes - this is exactly the behaviour you get when an .xll add-in has the wrong 'bitness' for the Excel process. For Excel-DNA you need to use a copy of ExcelDna.xll for 32-bit Excel versions (running on 32-bit or 64-bit Windows), and a copy of ExcelDna64.xll for the 64-bit version of Excel 2010.

    Note that on all versions of Windows (both 32-bit and 64-bit) the recommended and default installation of Office is the 32-bit version.