التحقق مما إذا كان مشروع VBA في كتاب عمل موقع بالتوقيع
Contents
[
Hide
]
يمكنك التحقق مما إذا كان مشروع VBA الخاص بك موقعًا أم لا باستخدام Microsoft Excel عبر الأمر Tools > Digital Signatures…. بالمثل, يمكنك التحقق منه بشكل برمجي باستخدام طريقة Aspose.Cells Workbook.getVbaProject().isSigned().
التحقق مما إذا كان مشروع VBA في مصنف عمل موقعًا
الكود التالي يحمل الكتاب ويتحقق مما إذا كان مشروع VBA الخاص به موقع بالتوقيع باستخدام خاصية Workbook.getVbaProject().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-Java | |
String dataDir = Utils.getDataDir(CheckVbaProjectSigned.class); | |
String inputPath = dataDir + "Sample1.xlsx"; | |
Workbook workbook = new Workbook(inputPath); | |
System.out.println("VBA Project is Signed: " + workbook.getVbaProject().isSigned()); |