通过Node.js的C++检查工作簿中的VBA项目是否已签名

在Node.js中检查工作簿中的VBA项目是否已签名

以下代码加载工作簿,并使用Workbook.getVbaProject()属性检测其VBA项目是否已签名。若已签名,返回true;否则返回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());