检查工作簿中的 VBA 项目是否已签名
Contents
[
Hide
]
您可以使用 Microsoft Excel 通过以下方式检查您的 VBA 项目是否已签名**工具 > 数字签名…**菜单命令。同样,您可以使用 Aspose.Cells 以编程方式检查它工作簿.getVbaProject().isSigned()方法。
检查工作簿中的 VBA 项目是否已签名
以下代码加载工作簿并检查其 VBA 项目是否已使用签名工作簿.getVbaProject().isSigned()财产。该物业将返回真的如果项目已签署,否则它将返回错误的.
示例代码
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()); |