将标注插入 Excel via .NET
使用 Aspose.Cells' API 插入标注,无需使用 Microsoft 或 Open Office、Adobe PDF 等任何软件。
如何使用 C# 将标注插入 Excel 文件
为了将标注插入 Excel 文件,我们将使用
API 这是一个功能丰富、强大且易于使用的文档操作和拆分器 API,适用于 C# 平台。打开
包管理器,搜索 Aspose.Cells 并安装。您还可以从包管理器控制台使用以下命令。
命令
PM> Install-Package Aspose.Cells
通过 C# 将标注插入 Excel 文件的步骤
您需要 aspose.cells.dll 在您自己的环境中尝试以下工作流程。
实例化一个 Workbook 对象。(或者->加载 XLSX 文件的完整路径。)
- 通过索引选择工作表。
- 使用 添加方法 在选定的工作表中插入标注 以 XLSX 格式保存工作簿。
系统要求
Aspose.Cells for .NET 在所有主要操作系统上均受支持。只需确保您满足以下先决条件即可。
- Microsoft Windows 或具有 .NET Framework、.NET Core、Mono 或 Xamarin 平台的兼容操作系统
- 开发环境如Microsoft Visual Studio
- 在项目中添加对 Aspose.Cells for .NET DLL 的引用 - 使用上面的下载按钮从 NuGet 安装
插入标注 - C#
标注类型概述

AutoShapeType.矩形标注

AutoShapeType.RoundedRectangleCallout

AutoShapeType.OvalCallout

AutoShapeType.CloudCallout

AutoShapeType.LineCalloutWithBorder1

AutoShapeType.LineCalloutWithBorder2

AutoShapeType.LineCalloutWithBorder3

AutoShapeType.LineCalloutWithAccentBar1

AutoShapeType.LineCalloutWithAccentBar2

AutoShapeType.LineCalloutWithAccentBar3

AutoShapeType.LineCalloutNoBorder1

AutoShapeType.LineCalloutNoBorder2

AutoShapeType.LineCalloutNoBorder3

AutoShapeType.LineCalloutWithBorderAndAccentBar1

AutoShapeType.LineCalloutWithBorderAndAccentBar2

AutoShapeType.LineCalloutWithBorderAndAccentBar3