Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

excel-dna

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.

like image 673
Dean Radcliffe Avatar asked Jun 29 '11 22:06

Dean Radcliffe


2 Answers

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.

like image 137
Govert Avatar answered Jan 03 '23 12:01

Govert


I've just had exactly the same problem, but NOT because of using DNA64. In my case the problem appeared when I was loading the XLL from C:\Temp\[blah]\myXll.xll If I copied the xll (and related folders) to C:\Program Files (x86)\[blah]\ then it worked fine.

like image 26
Bamboozled Avatar answered Jan 03 '23 11:01

Bamboozled