检查工作簿中的VBA项目是否已签名
Contents
[
Hide
]
您可以通过Microsoft Excel的**工具 > 数字签名…**菜单命令检查VBA项目是否已签名。同样,也可以使用Aspose.Cells for Python via .NET的Workbook.vba_project.is_signed属性编程方式进行验证。
在Python中检查工作簿中的VBA项目是否已签名
以下代码加载工作簿并使用Workbook.vba_project.is_signed属性检查其VBA项目是否已签名。如果项目已签名,则该属性将返回true,否则将返回false。
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
from aspose.cells import Workbook | |
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET | |
# The path to the documents directory. | |
dataDir = RunExamples.GetDataDir(".") | |
workbook = Workbook(dataDir + "Sample1.xlsx") | |
print("VBA Project is Signed: " + str(workbook.vba_project.is_signed)) |