I'm building XLL add-ins for Excel, using C++ and XLW library.
It works fine on my PC, and on many others. But in some cases, when I drag the XLL into a new Excel window, this error shows up:
The file you are trying to open, 'my_addin.xll', 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?
If click yes
, then Excel will open the XLL as a text file, showing something like this:
MZÿÿ¸@ Í!¸LÍ!This program cannot be run in DOS mode.
right at the first row. This is not expected to happen. What could be the reason for that?
This is the system configuration of all machines:
- Microsoft Windows 7 Professional 64-bit (operational system)
- Microsoft Excel 2010 32-bit