Excel API Library for .NET - Sample Browser | Document Solutions | Add non visible signature
[
フレーム]
Ensure the integrity of the workbook by adding an invisible digital signature with ISignatureSet.AddNonVisibleSignature method.
//create a new workbook
var workbook = new GrapeCity.Documents.Excel.Workbook();
ISignature signature = workbook.Signatures.AddNonVisibleSignature();
// TODO: Use your information
var details = new SignatureDetails
{
Address1 = "<your address>",
Address2 = "<address 2>",
SignatureComments = "Final",
City = "<your city>",
StateOrProvince = "<your state or province>",
PostalCode = "<your postal code>",
CountryName = "<your country or region>",
ClaimedRole = "<your role>",
CommitmentTypeDescription = "Approved",
CommitmentTypeQualifier = "Final"
};
// TODO: Use your certificate
var cert = new X509Certificate2("<your certificate file>", "<your password>");
// TODO: Use your name or signature image
signature.Sign(cert, details);
// Commit signature
workbook.Save("SignWorkbook.xlsx");
' Create a new Workbook
Dim workbook As New Workbook
Dim signature As ISignature = workbook.Signatures.AddNonVisibleSignature()
' TODO: Use your information
Dim details As New SignatureDetails With {
.Address1 = "<your address>",
.Address2 = "<address 2>",
.SignatureComments = "Final",
.City = "<your city>",
.StateOrProvince = "<your state or province>",
.PostalCode = "<your postal code>",
.CountryName = "<your country or region>",
.ClaimedRole = "<your role>",
.CommitmentTypeDescription = "Approved",
.CommitmentTypeQualifier = "Final"
}
' TODO: Use your certificate
Dim cert As New X509Certificate2("<your certificate file>", "<your password>")
' TODO: Use your name or signature image
signature.Sign(cert, details)
' Commit signature
workbook.Save("SignWorkbook.xlsx")