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.
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.
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.
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.
© 2022 - 2024 — McMap. All rights reserved.