Überprüfen, ob das VBA Projekt in einer Arbeitsmappe signiert ist
Contents
[
Hide
]
Sie können über Microsoft Excel mithilfe des Menübefehls Extras > Digitale Signaturen… prüfen, ob Ihr VBA-Projekt signiert ist oder nicht. Ebenso können Sie dies programmgesteuert mithilfe der Aspose.Cells-Workbook.VbaProject.IsSigned-Eigenschaft überprüfen.
Ü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.
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); |