التحقق مما إذا كان مشروع VBA في كتاب عمل موقع بالتوقيع
Contents
[
Hide
]
يمكنك التحقق مما إذا كان مشروع VBA الخاص بك موقع بالتوقيع أم لا باستخدام Microsoft Excel عبر أمر القائمة Tools > Digital Signatures…. على نفس النحو، يمكنك التحقق منه برمجيًا باستخدام خاصية Aspose.Cells Workbook.VbaProject.IsSigned.
التحقق مما إذا كان مشروع VBA في كتاب عمل موقع بالتوقيع في C#
الكود التالي يحمل الكتاب ويتحقق مما إذا كان مشروع VBA الخاص به موقع بالتوقيع باستخدام خاصية Workbook.VbaProject.IsSigned. ستعيد الخاصية true إذا كان المشروع موقع بالتوقيع وإلا ستعيد 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); |