MudTools.OfficeInterop
2.0.9
dotnet add package MudTools.OfficeInterop --version 2.0.9
NuGet\Install-Package MudTools.OfficeInterop -Version 2.0.9
<PackageReference Include="MudTools.OfficeInterop" Version="2.0.9" />
<PackageVersion Include="MudTools.OfficeInterop" Version="2.0.9" />
<PackageReference Include="MudTools.OfficeInterop" />
paket add MudTools.OfficeInterop --version 2.0.9
#r "nuget: MudTools.OfficeInterop, 2.0.9"
#:package MudTools.OfficeInterop@2.0.9
#addin nuget:?package=MudTools.OfficeInterop&version=2.0.9
#tool nuget:?package=MudTools.OfficeInterop&version=2.0.9
MudTools.OfficeInterop
核心模块,提供 Office 应用程序的基础接口和通用功能。
项目概述
MudTools.OfficeInterop 是整个 Office 互操作库的核心模块,提供了 Office 应用程序的基础接口和通用功能。该模块封装了 Office 核心组件的常用操作,为其他 Office 应用程序模块(Excel、Word、PowerPoint)提供基础支撑。
此外,该模块还提供了 Office UI 相关组件的封装,包括功能区(Ribbon)和自定义任务窗格(CTP),方便开发者创建 Office 插件时使用。
主要功能
- 提供 Office 应用程序的基础接口和通用功能
- 封装 Office 核心组件的常用操作
- 提供 Office UI 相关组件的封装,包括功能区(Ribbon)和自定义任务窗格(CTP)
- 为 Excel、Word、PowerPoint 模块提供基础接口支持
支持的框架
- .NET Framework 4.6.2
- .NET Framework 4.7
- .NET Framework 4.8
- .NET Standard 2.1
- .NET 6.0-windows
- .NET 7.0-windows
- .NET 8.0-windows
- .NET 9.0-windows
安装
<PackageReference Include="MudTools.OfficeInterop" Version="1.1.8" />
核心组件
OfficeUIFactory
OfficeUIFactory 是用于创建 Office UI 相关组件的工厂类,提供以下方法:
CreateCTPFactory- 创建自定义任务窗格工厂的包装器实例CreateRibbonUI- 创建功能区 UI 的包装器实例CreateRibbonControl- 创建功能区控件的包装器实例
使用示例
使用自定义任务窗格
// 创建自定义任务窗格
var ctpFactory = OfficeUIFactory.CreateCTPFactory(officeCTPFactory);
var ctp = ctpFactory.CreateCTP("MyAddin.UserControl", "我的任务窗格");
// 设置任务窗格属性
ctp.Visible = true;
ctp.Width = 200;
// 显示任务窗格
ctp.DockPosition = MsoCTPDockPosition.msoCTPDockPositionRight;
使用功能区控件
// 处理功能区控件事件
public void OnRibbonButtonClicked(IRibbonControl control)
{
switch (control.Id)
{
case "buttonNewDocument":
// 处理按钮点击事件
break;
case "buttonOpenDocument":
// 处理打开文档事件
break;
}
}
许可证
本项目采用双重许可证模式:
免责声明
本项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任。
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 is compatible. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.6.2
- Microsoft.CSharp (>= 4.7.0)
- System.ValueTuple (>= 4.6.1)
-
.NETStandard 2.0
- Microsoft.CSharp (>= 4.7.0)
- System.Drawing.Common (>= 4.7.3)
- System.ValueTuple (>= 4.6.1)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on MudTools.OfficeInterop:
| Package | Downloads |
|---|---|
|
MudTools.OfficeInterop.Vbe
适用于 .NET 平台的现代化 VBE 封装组件,提供面向对象的接口以替代微软 VSTO。显著简化与底层 COM 组件的交互,让开发者能够更专注于业务逻辑的开发。 |
|
|
MudTools.OfficeInterop.Word
适用于 .NET 平台的现代化 Word 封装组件,提供面向对象的接口以替代微软 VSTO。显著简化与底层 COM 组件的交互,让开发者能够更专注于业务逻辑的开发。 |
|
|
MudTools.OfficeInterop.PowerPoint
适用于 .NET 平台的现代化 PowerPoint 封装组件,提供面向对象的接口以替代微软 VSTO。显著简化与底层 COM 组件的交互,让开发者能够更专注于业务逻辑的开发。 |
|
|
MudTools.OfficeInterop.Excel
适用于 .NET 平台的现代化 Excel 封装组件,提供面向对象的接口以替代微软 VSTO。显著简化与底层 COM 组件的交互,让开发者能够更专注于业务逻辑的开发。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2.0.9 | 189 | 4/24/2026 | |
| 2.0.8 | 1,016 | 2/24/2026 | |
| 2.0.7 | 266 | 2/4/2026 | |
| 2.0.6 | 260 | 1/24/2026 | |
| 2.0.5 | 295 | 1/11/2026 | |
| 2.0.4 | 241 | 1/6/2026 | |
| 2.0.3 | 279 | 12/31/2025 | |
| 2.0.2 | 273 | 12/27/2025 | |
| 2.0.1 | 333 | 12/25/2025 | |
| 1.2.2 | 317 | 11/1/2025 | |
| 1.2.1 | 377 | 10/23/2025 | |
| 1.2.0 | 350 | 10/20/2025 | |
| 1.1.9 | 379 | 10/1/2025 | |
| 1.1.8 | 398 | 9/25/2025 | |
| 1.1.7 | 441 | 9/22/2025 | |
| 1.1.6 | 566 | 9/19/2025 | |
| 1.1.5 | 551 | 9/17/2025 | |
| 1.1.4 | 396 | 9/14/2025 | |
| 1.1.3 | 363 | 9/12/2025 | |
| 1.1.2 | 547 | 9/11/2025 |
Initial release of MudTools.OfficeInterop core library.