Node.js kullanarak ve C++ üzerinden VBA Sertifikasını Dosyaya veya Akışa Aktarın

Node.js kullanarak VBA Sertifikasını Dosyaya veya Akışa Aktarın

Lütfen, VBA Sertifikasının ham verilerini bir dosyaya kaydeden aşağıdaki örnek kodu inceleyin. Bu kodu içeren örnek excel dosyasını buradaki bağlantıdan indirebilirsiniz.

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));