Vérifier si le projet VBA dans un classeur est signé avec Node.js via C++

Vérifier si le projet VBA dans un classeur est signé dans Node.js

Le code suivant charge le classeur et vérifie si son projet VBA est signé en utilisant la propriété Workbook.getVbaProject(). La propriété retournera true si le projet est signé, sinon elle retournera false.

const path = require("path");
const AsposeCells = require("aspose.cells.node");

// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "Sample1.xlsx");
// Loads the workbook which contains hidden external links
const workbook = new AsposeCells.Workbook(filePath);
console.log("VBA Project is Signed: " + workbook.getVbaProject().isSigned());