Creare una linea di firma in un Workbook Excel
Introduzione
Microsoft Excel fornisce la funzionalità di aggiungere Linea firma in workbook Excel. È possibile aggiungere una linea di firma facendo clic sulla scheda Inserisci e quindi selezionando Linea firma dal gruppo Testo.
Come Creare una Linea di Firma per Excel
Aspose.Cells per Python via .NET offre anche questa funzionalità e ha esposto la proprietà Picture.signature_line a tale scopo. Questo articolo spiega come usare questa proprietà per aggiungere una linea di firma usando Aspose.Cells per Python via .NET.
Il seguente codice di esempio aggiunge una linea di firma utilizzando la proprietà Picture.signature_line e salva il workbook.
from aspose.cells import Workbook | |
from aspose.cells.drawing import SignatureLine | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
# Create workbook object | |
workbook = Workbook() | |
# Insert picture of your choice | |
index = workbook.worksheets[0].pictures.add(0, 0, dataDir + "signature.jpg") | |
# Access picture and add signature line inside it | |
pic = workbook.worksheets[0].pictures[index] | |
# Create signature line object | |
s = SignatureLine() | |
s.signer = "John Doe" | |
s.title = "Development Lead" | |
s.email = "john.doe@aspose.com" | |
# Assign the signature line object to Picture.SignatureLine property | |
pic.signature_line = s | |
# Save the workbook | |
workbook.save(dataDir + "output_out.xlsx") |