Add Digital Signature to an already signed Excel file
Contents
[
Hide
]
Possible Usage Scenarios
Aspose.Cells provides the Workbook.addDigitalSignature(DigitalSignatureCollection digitalSignatureCollection) method that you can use to add digital signature to an already signed Excel file.
Please note while adding a digital signature to an already signed Excel document, if the original document is Aspose.Cells generated document, it works well. But if the original document is generated by other engines (e.g. Microsoft Excel etc.), Aspose.Cells cannot keep the file same after loading and re-saving it, this will make the original signature to be invalid.
Add Digital Signature to an already signed Excel file
The following sample code explains how to make use of Workbook.addDigitalSignature(DigitalSignatureCollection digitalSignatureCollection) method to add a digital signature to already signed Excel file. Please check the sample Excel file used in this code. This file is already digitally signed. Please check the output Excel file generated by the code. We have used the demo certificate named AsposeTest.pfx in this code which has a password aspose. The screenshot shows the effect of the sample code on the sample Excel file after execution.