Check if VBA project in a Workbook is Signed with Node.js via C++
Contents
[
Hide
]
You can check if your VBA project is signed or not using Microsoft Excel via Tools > Digital Signatures… menu command. Similarly, you can check it programmatically using Aspose.Cells Workbook.getVbaProject() property.
Check if VBA project in a Workbook is Signed in Node.js
The following code loads the workbook and checks if its VBA project is signed using Workbook.getVbaProject() property. The property will return true if the project is signed otherwise it will return 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());