Überprüfen, ob das VBA Projekt in einer Arbeitsmappe signiert ist

Überprüfen Sie, ob das VBA-Projekt in einer Arbeitsmappe in C# signiert ist

Der folgende Code lädt die Arbeitsmappe und überprüft, ob ihr VBA-Projekt mithilfe der Workbook.VbaProject.IsSigned-Eigenschaft signiert ist. Die Eigenschaft gibt true zurück, wenn das Projekt signiert ist, andernfalls 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);