Check if VBA Code is Signed

Check if VBA Code is Signed

The following code explains how to check if the VBA code is signed or not using the Workbook.getVbaProject().isSigned() method. You can use any of your excel files to test this code. For testing purpose you can use this excel file used in the code.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java
// The path to the documents directory.
String dataDir = Utils.getDataDir(CheckVBAProjectInWorkbookIsSigned.class);
Workbook workbook = new Workbook(dataDir + "source.xlsm");
System.out.println("VBA Project is Signed: " + workbook.getVbaProject().isSigned());

Console Output

Below is the console output of the above code using the sample excel file provided by the link.

Is VBA Code Project Signed: true