Excel 2003 文档级自定义和 Excel 2010 兼容性
有谁知道是否有办法使 Excel 2003 文档级自定义与 Excel 2010 一起使用?当我尝试执行基于 Excel 2003 和 VSTO 2005 SE 构建的文档级自定义时,出现以下错误。
“无法找到程序集 * 或无法加载。
您仍然可以编辑和保存文档。请与您的管理员或本文档的作者联系以获取进一步帮助。”
任何帮助将不胜感激。
Does anyone know if there is a way to make an Excel 2003 Document Level Customization work with Excel 2010? When I try to execute this document level customization built on Excel 2003 and VSTO 2005 SE, I get the following error.
"The assembly * could not be found at or could not be loaded.
You can still edit and save the document. Contact your administrator or the author of this document for further assistance."
Any help would be appriciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
只是为了与人们分享我迄今为止所学到的东西。
Office 2010,特别是 Excel 2010,在文档级自定义方面存在 64 位兼容性问题,并且我认为在执行基于 Excel 2003 文件构建的解决方案时存在加载项问题。这似乎是 Visual Studio Tools For Office SE (VSTO) 的一个更具体的问题,其中 32 位的 OTKLoader.dll 无法由 Excel 2010 64 位版本加载。
我们的具体测试是采用 Visual Studio 2008 构建的 Excel 2003 文档级自定义,并将其安装在运行 Office 2010 64 位的 Windows 7 64 位计算机上。收到的错误是我原来的问题中所述的错误。
然后,我们使用运行 Office 2010 32 位的 Windows 7 64 位计算机并安装了 Office 商业应用程序。 OBA,文档级定制,执行没有错误。
您可能需要参考 Microsoft 的以下文章。
“Office 2010 32 位和 64 位版本之间的兼容性”
http://msdn.microsoft.com/en-us/library/ee691831.aspx
我个人还没有完全读完这篇文章,但是有足够的描述性文本和一些明确的陈述,使我相信 Office 2003 自定义设置目前不兼容使用 Office 2010 的 64 位版本。
希望能帮助那里的人。解决这个问题确实很痛苦。
请注意,我们目前提供的选项是:
答:仅允许 32 位版本的 Office 2010。
B:所有 Office/Excel 2003 文档级自定义必须至少升级到 Excel 2007 解决方案。
Just to share with people what I've learned thus far.
Office 2010, specifically in this case Excel 2010, has 64bit compatibility issues with Document Level customizations and I think Add-Ins when executing solutions built on Excel 2003 files. This appears to be an issue more specifically with Visual Studio Tools For Office SE (VSTO) where the OTKLoader.dll, being 32 bit, can't be loaded by Excel 2010 64bit version.
Our specific test was to take an Excel 2003 Document Level customization built by Visual Studio 2008, and install it on a Windows 7 64 bit machine running Office 2010 64 bit. The error received is the error as stated in my original question.
We then took a Windows 7 64 bit machine running Office 2010 32 bit and installed the Office Business Application. The OBA, the documen level customization, executed without error.
You'll probably want to reference the following article from Microsoft.
"Compatibility Between the 32-bit and 64-bit Versions of Office 2010"
http://msdn.microsoft.com/en-us/library/ee691831.aspx
I personally haven't made it through the article completely, but there's enough descriptive text and some explict statements that lead me to believe that Office 2003 customizations, currently, are not compatible with Office 2010's 64 bit version.
Hope that helps someone out there. This was a real pain to sort out.
Note the options we're presenting at this time are to:
A: Only allow 32 bit versions of Office 2010.
B: All Office / Excel 2003 Document Level Customizations must be upgraded, at a minimum, to Excel 2007 solutions.
不,你不能,因为你引用的 interop/vsto 库必须不同。
Excel 2003 在 VSTO 2005 SE 上运行,而 Excel 2010 需要 VSTO 2010 库。
VSTO 2005 不适用于 Excel 2010,VSTO 2010 不适用于 Excel 2003。
No you cant, because interop/vsto library you reference has to be different.
Excel 2003 works on VSTO 2005 SE whereas Excel 2010 needs VSTO 2010 library.
VSTO 2005 doesnt work with Excel 2010 and VSTO 2010 doesnot works Excel 2003.
为了扩展你的发现,罗布,是的,这是正确的(你可以)。我相信其他贡献者犯了一个错误。
对于 32 位版本的 Office,它可以工作(并且确实如此,所以您已经发现),但它不适用于 64 位版本的 Office。微软明确指出了这种兼容性限制(好吧,至少作为脚注)。
请参阅 MSDN 文章在不同版本的 Microsoft Office 中运行解决方案。
在“运行使用 Visual Studio 早期版本创建的 Office 解决方案”部分下,您将在最后一行的图表中看到,使用 VSTO 2005 SE 以及面向 Office 2003 的项目模板将在 Microsoft 上运行Office 2003、Microsoft Office 2007 和 Microsoft Office 2010(仅限 32 位)。
进一步说,您将需要在客户端的 PC 上安装 Visual Studio 2005 Tools for Office Second Edition 运行时。
您所描述的选项是正确的。这些应该是您拥有的唯一选择。
To expand on your findings, Rob, yes, that is correct (you can). I believe the other contributor has made a mistake.
For 32-bit versions of Office, it will work (and it does, so you have found), but it will not work for 64-bit editions of Office. Microsoft clearly states this compatibility restriction (well, as a footnote at least).
See the MSDN article Running Solutions in Different Versions of Microsoft Office.
Under section "Running Office Solutions Created By Using Previous Versions of Visual Studio", you will see in the chart in the last row that using VSTO 2005 SE with a project template targeted for Office 2003 will run on Microsoft Office 2003, Microsoft Office 2007, and Microsoft Office 2010 (32-bit only).
It goes on further to say that you will be required to install the Visual Studio 2005 Tools for Office Second Edition runtime on the client's PC.
Your options that you described are correct. Those should be the only options that you have.