Cree una línea de firma en un libro de Excel usando Aspose.Cells
Contents
[
Hide
]
Microsoft Excel ofrece una función para agregarLínea de la firma en libros de Excel. Puede agregar una línea de firma haciendo clic en elInsertar Tabulador y luego seleccionandoLínea de la firma desde elTexto grupo.
Aspose.Cells también proporciona esta función y ha expuesto laImagen.SignatureLine propiedad para este fin. Este artículo explicará cómo usar esta propiedad para agregar una línea de firma usando Aspose.Cells.
El siguiente código de ejemplo agrega una línea de firma usandoImagen.SignatureLinepropiedad y guarda el libro de trabajo.
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"); |