检查工作簿中的VBA项目是否已签名

在C#中检查工作簿中的VBA项目是否已签名

以下代码加载工作簿并使用Workbook.VbaProject.IsSigned属性检查其VBA项目是否已签名。如果项目已签名,则该属性将返回true,否则将返回false

// 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);