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

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

以下代码加载工作簿并检查其 VBA 项目是否已使用签名工作簿.VbaProject.IsSigned财产。该物业将返回真的如果项目已签署,否则它将返回错误的.

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