c# - 当前使用 C# 扩展 Excel 的最佳方法是什么?

标签 c# .net ms-office vsto office-interop

我有VS2008和VS2010的专业版。

我希望向 Excel 中的工具栏添加几个按钮。单击它们时,我希望能够打开一个表单(WinForms 或 WPF 都可以),从表单中的用户收集一些值,然后获取该数据+从当前工作表中读取单元格值来执行某些数据库操作操作。

目前使用 C# 执行此操作的最佳方法是什么?我非常感谢任何示例/教程的指针。我的理解是,VS2010 大大改进了流程,但我可能必须使用 Excel 2003,我认为它不支持。

我对 Visual Studio 2008 的扩展性->共享插件模板和我见过的其他 Office 插件模板感到困惑。我不确定哪种类型的解决方案适合。

我是 Office 开发新手,因此我非常感谢任何帮助我走上正轨的帮助。

非常感谢。

最佳答案

几个出发点:

此外,您还想探索 .NET Excel Wrapper

.NET Excel wrapper was born out of frustration from working with .NET and Excel. The documentation for .NET Interop.Excel is very scarce and the API is bloated with hard to understand parameters and methods that throw unknown errors.

What .NET Excel Wrapper aims to do is take the complexity out of working with Excel in .NET and increase your productivity, improve code readability and reduce the amount of code you need to write.

关于c# - 当前使用 C# 扩展 Excel 的最佳方法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2791647/

相关文章:

c# - 在 C# 中获取 [DataMember] 的名称

c# - 使用队列进行深度优先搜索

c# - 提高 ASP.NET/C# 编译速度的最佳方法是什么?

.net - Microsoft.Office.Interop.Word 文档

c# - 在引用列表中找不到 Microsoft.Office.Interop.Word

vba - Excel 2010 VBA 创建日期

c# - Quickfix/n,如何禁用商店和日志工厂?

c# - 为什么三元运算符不替换 if-else

c# - XmlCodeExporter 和可为 null 的类型

c# - 在 C# 中连接到 Microsoft Exchange PowerShell