Check if VBA project in a Workbook is Signed
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.VbaProject.IsSigned property.
Check if VBA project in a Workbook is Signed in C#
The following code loads the workbook and checks if its VBA project is signed using Workbook.VbaProject.IsSigned property. The property will return true if the project is signed otherwise it will return false.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET | |
// The path to the documents directory. | |
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
Workbook workbook = new Workbook(dataDir + "Sample1.xlsx"); | |
Console.WriteLine("VBA Project is Signed: " + workbook.VbaProject.IsSigned); |