Esporta il certificato VBA in file o stream con Node.js tramite C++
Contents
[
Hide
]
Aspose.Cells ti consente di esportare il certificato digitale VBA su un flusso come file o memory stream. Puoi accedere ai dati grezzi del certificato digitale VBA utilizzando la proprietà VbaProject.getCertRawData().
Esporta il certificato VBA in file o stream in Node.js
Consulta il seguente codice di esempio che salva i dati grezzi del certificato VBA in un file. Puoi scaricare il file di esempio di Excel utilizzato in questo codice dal link fornito.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
// Load your source excel file into workbook object
const workbook = new AsposeCells.Workbook(path.join(dataDir, "sampleVBAProjectSigned.xlsm"));
// Retrieve bytes data of Digital Certificate of VBA Project
const certBytes = workbook.getVbaProject().getCertRawData();
// Save Certificate Data into FileStream
require("fs").writeFileSync(path.join(dataDir, "Cert_out_"), Uint8Array.from(certBytes));