C ++ 64位Excel加载项(XLL)无法在64位Excel中正确加载 [英] C++ 64-bit Excel add-in (XLL) is not loading correctly in 64-bit Excel

查看:930
本文介绍了C ++ 64位Excel加载项(XLL)无法在64位Excel中正确加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一段C ++代码,它创建了XLL(Excel加载项)。

I have a piece of C++ code, which creates a XLL (Excel add-in). It can be successfully loaded by Excel, and works perfectly.

然后,我切换到64位Excel,并且代码停止工作。因此,我已经使用x64平台设置在Visual Studio中重新编译了代码。编译没有错误。

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.

现在,当我尝试在64位Excel中加载它时,Excel无法识别文件扩展名:

Now when I try to load it in 64-bit Excel, Excel does not recognize the file extension:

它抱怨显示'MyAddin.xll'的文件格式和扩展名't match。,然后提供以下继续选项:取消

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:


该程序无法在DOS模式下运行。

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?

我的要求是:


  1. 64位Excel必须将我的XLL识别为有效的加载项(第一条错误消息必须消失)

  1. 64-bit Excel must recognize my XLL as valid add-in (the first error message has to go away)

第二个错误是什么意思?

What means the second error?


推荐答案

使用32位版本的Excel打开64位插件,您将报告只能在DOS下打开的错误。您需要安装64位(通常无法安装32位和64位)办公室才能打开64位插件!

You use the 32 bit version of Excel to open the 64 bit plug-in, and you will report errors that can only be opened under DOS. You need to install a 64 bit (normally unable to install 32 bit and 64 bit) office to open the 64 bit plug-in!

这篇关于C ++ 64位Excel加载项(XLL)无法在64位Excel中正确加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆