I have a piece of C++ code, which creates a XLL (Excel add-in). It can be successfully loaded by Excel, and works perfectly.
Then, I switched to 64-bit Excel, and the code stopped working. So I have recompiled the code in Visual Studio using x64 platform settings. The compilation went error free.
Now when I try to load it in 64-bit Excel, Excel does not recognize the file extension:
It complains showing "The file format and extension of 'MyAddin.xll' don't match.", and gives me the follwoing options to continue: yes
, no
, or cancel
.
If I ignore the message and press yes
, then the add-in crashes, and I get the error:
This program cannot be run in DOS mode.
Since the add-in compiles correctly, I am not sure how to troubleshoot this error. My question is: Can anyone please give me any pointers as to how to overcome the problem?
My requirements are:
64-bit Excel must recognize my XLL as valid add-in (the first error message has to go away)
What means the second error?