Controlla se il progetto VBA in una cartella di lavoro è firmato
Contents
[
Hide
]
Puoi verificare se il tuo progetto VBA è firmato o meno utilizzando Microsoft Excel tramiteStrumenti > Firme digitali… comando di menù. Allo stesso modo, puoi controllarlo a livello di codice usando Aspose.CellsWorkbook.VbaProject.IsSigned proprietà.
Controlla se il progetto VBA in una cartella di lavoro è firmato in C#
Il codice seguente carica la cartella di lavoro e controlla se il relativo progetto VBA è firmato utilizzandoWorkbook.VbaProject.IsSigned proprietà. La proprietà torneràVERO se il progetto è firmato altrimenti torneràfalso.
This file contains hidden or 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); |