Create Signature Line in an Excel Workbook using Aspose.Cells
Introduction
Microsoft Excel provides a feature to add Signature Line in Excel workbooks. You can add a Signature Line by clicking the Insert Tab and then selecting Signature Line from the Text group.
How to Create Signature Line for Excel
Aspose.Cells also provides this feature and has exposed the Picture.SignatureLine property for this purpose. This article will explain how to use this property to add a Signature Line using Aspose.Cells.
The following sample code adds a Signature Line using Picture.SignatureLine property and saves the workbook.
// 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"); |