Bir Çalışmada VBA Projesinin İmzalı Olup Olmadığını Kontrol Edin
Contents
[
Hide
]
Microsoft Excel üzerinden Araçlar > Dijital İmzalar… menü komutunu kullanarak VBA projenizin imzalı olup olmadığını kontrol edebilirsiniz. Benzer şekilde, Aspose.Cells Workbook.VbaProject.IsSigned özelliğini kullanarak programlı olarak da kontrol edebilirsiniz.
C#‘da Bir Çalışbooktaki VBA Projesinin İmzalı Olup Olmadığını Kontrol Et
Aşağıdaki kod, çalışbook yükler ve Workbook.VbaProject.IsSigned özelliğini kullanarak VBA projesinin imzalı olup olmadığını kontrol eder. Proje imzalıysa true döndürecek, aksi takdirde false döndürecektir.
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); |