使用Aspose.Cells在Excel工作簿中创建签名行
Contents
[
Hide
]
介绍
Microsoft Excel提供了在Excel工作簿中添加 签名行 的功能。您可以通过单击 插入 选项卡,然后从 文本 组中选择 签名行 来添加签名行。
如何为Excel创建签名行
Aspose.Cells也提供了这个功能,并为此暴露了 Picture.SignatureLine 属性。本文将解释如何使用此属性来使用Aspose.Cells添加签名行。
以下示例代码使用 Picture.SignatureLine 属性添加了一个签名行并保存了工作簿。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
// Create workbook object | |
Workbook workbook = new Workbook(); | |
// Create signature line object | |
SignatureLine s = new SignatureLine(); | |
s.Signer = "John Doe"; | |
s.Title = "Development Lead"; | |
s.Email = "john.doe@aspose.com"; | |
// Adds a Signature Line to the worksheet. | |
workbook.Worksheets[0].Shapes.AddSignatureLine(1, 1, s); | |
// Save the workbook | |
workbook.Save(dataDir + "output_out.xlsx"); |