将标注插入 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#
标注类型概述
![](/cells/net/shapes/insert-callouts-to-excel/speech_bubble_rectangle.png)
AutoShapeType.矩形标注
![](/cells/net/shapes/insert-callouts-to-excel/speech_bubble_rectangle_with_corners_rounded.png)
AutoShapeType.RoundedRectangleCallout
![](/cells/net/shapes/insert-callouts-to-excel/speech_bubble_oval.png)
AutoShapeType.OvalCallout
![](/cells/net/shapes/insert-callouts-to-excel/thought_bubble_cloud.png)
AutoShapeType.CloudCallout
![](/cells/net/shapes/insert-callouts-to-excel/line.png)
AutoShapeType.LineCalloutWithBorder1
![](/cells/net/shapes/insert-callouts-to-excel/bent_line.png)
AutoShapeType.LineCalloutWithBorder2
![](/cells/net/shapes/insert-callouts-to-excel/double_bent_line.png)
AutoShapeType.LineCalloutWithBorder3
![](/cells/net/shapes/insert-callouts-to-excel/line_with_accent_bar.png)
AutoShapeType.LineCalloutWithAccentBar1
![](/cells/net/shapes/insert-callouts-to-excel/bent_line_with_accent_bar.png)
AutoShapeType.LineCalloutWithAccentBar2
![](/cells/net/shapes/insert-callouts-to-excel/double_bent_line_with_accent_bar.png)
AutoShapeType.LineCalloutWithAccentBar3
![](/cells/net/shapes/insert-callouts-to-excel/line_with_no_border.png)
AutoShapeType.LineCalloutNoBorder1
![](/cells/net/shapes/insert-callouts-to-excel/bent_line_with_no_border.png)
AutoShapeType.LineCalloutNoBorder2
![](/cells/net/shapes/insert-callouts-to-excel/double_bent_line_with_no_border.png)
AutoShapeType.LineCalloutNoBorder3
![](/cells/net/shapes/insert-callouts-to-excel/line_with_border_and_accent_bar.png)
AutoShapeType.LineCalloutWithBorderAndAccentBar1
![](/cells/net/shapes/insert-callouts-to-excel/bent_line_with_border_and_accent_bar.png)
AutoShapeType.LineCalloutWithBorderAndAccentBar2
![](/cells/net/shapes/insert-callouts-to-excel/double_bent_line_with_border_and_accent_bar.png)
AutoShapeType.LineCalloutWithBorderAndAccentBar3