gpt4 book ai didi

c# - 适用于 Excel 2007 和 2010 的 Excel 插件

转载 作者:行者123 更新时间:2023-11-30 13:05:25 25 4
gpt4 key购买 nike

我正在编写一个应该在 2007 年和 2010 年都可以使用的 Excel 插件。当我使用 Visual Studio 创建一个新项目时,我需要决定我想要哪个版本。我之前选择的是2007,但是因为我安装了2010所以无法调试。我得到一个错误:

You cannot debug or run this project, because the required version of the Microsft Office application is not installed.

据我了解,如果我的目标是 2007 年,我应该能够在 2007 年和 2010 年都运行它。对吗?如果是这样,我可以使用 2010 对其进行调试吗?

最佳答案

A shared Add-in is made from a Visual Studio project creating a Com Add-In implementing the IDTExtensibility2 interface. This grants you access to the Excel model (workbooks, worksheets, Range, ...). This kind of project is still today what looks the most like a C# XLA. They are often used for formal commercial development deployed to external clients. While they are more difficult to make and maintain, they do give you deeper control over the Add-in and can be made somewhat version-agnostic (that is, you can use your own IA instead of a specific Office PIA library, and/or can do more in late binding to handle multiple Office versions with lower risks of compatibility problems).

此处:http://metasharp.net/index.php?title=Csharp_and_Excel_Interoperability

关于c# - 适用于 Excel 2007 和 2010 的 Excel 插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4937891/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com