Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells provides support for signing workbooks with XAdES Signature. For this, the API provides the DigitalSignature class and XAdESType enumeration.
The following code snippet demonstrates the use of the DigitalSignature class to sign the source workbook.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// Source directory
const sourceDir = path.join(__dirname, "data");
// Output directory
const outputDir = path.join(__dirname, "output");
const filePath = path.join(sourceDir, "sourceFile.xlsx");
const workbook = new AsposeCells.Workbook(filePath);
const password = "pfxPassword";
const pfx = path.join(sourceDir, "AsposeDemo.pfx");
const signature = new AsposeCells.DigitalSignature(pfx, "aspose", "testXAdES", new Date());
signature.setXAdESType(AsposeCells.XAdESType.XAdES);
const dsCollection = new AsposeCells.DigitalSignatureCollection();
dsCollection.add(signature);
workbook.setDigitalSignature(dsCollection);
workbook.save(outputDir + "XAdESSignatureSupport_out.xlsx");
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.