问题描述
我在VC ++ 2010中编写了一个非常简单的xll文件,而我使用的Excel是Excel2007。该库仅包含一个函数:
I wrote a very simple xll file in VC++ 2010, and the Excel I am using is Excel 2007. The library contains only one function:
extern "C" LPXLOPER12 WINAPI tsMkErr() {
static XLOPER12 x;
x.xltype = xltypeErr;
x.val.err = xlerrNull;
return &x;
}
和必要的xlAutoOpen函数。我编译了dll文件,将名称更改为xll,然后双击它以在Excel中打开。一切都会按我的预期进行。
and the necessary xlAutoOpen function. I compiled and dll file, change the name to xll, and double click it to open in Excel. Everything works just as I expected.
但是,如果我试图在另一台PC上打开此文件,Excel会一直告诉我:
However, if I am trying to open this file on another PC, the Excel just keeps telling me that:
您要打开的文件'.xll'与文件扩展名指定的格式不同。打开文件之前,请验证文件是否未损坏且来自受信任的源。您要立即打开文件吗?
The file you are trying to open, '.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?
当我单击是时,会弹出垃圾。
When I click yes, garbage pops out.
我也尝试通过加载项管理器加载它。在这种情况下,我可以打开文件,但是找不到我的函数tsMkErr()。
I also tried to load it via Add-in Manager. In this case I can open the file, but cannot find my function tsMkErr().
我将感谢所有建议...
I would be grateful to all suggestions ...
btw,我真的不知道如何选择一个答复作为答案。如果您知道该怎么做,也请让我知道:)
btw, I don't really know how to choose a reply as an answer. If you know how to do it, please also let me know :)
...本周我将发布我的工具...现在我才意识到仅可在我的PC上使用...请帮助... T_T
... I am going to publish my tool this week ... now I just realized it only works on my PC ... please help ... T_T
推荐答案
帮个忙,并使用。
这篇关于“ addin.XLL格式不同”。问题,无法打开我自己创建的xll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!