ブックのVBAプロジェクトが署名されているかどうかを確認
Contents
[
Hide
]
Microsoft Excelでは、**ツール > デジタル署名…**メニューコマンドを使用してVBAプロジェクトが署名されているかどうかを確認できます。同様に、Aspose.CellsのWorkbook.VbaProject.IsSignedプロパティを使用してプログラムで確認することも可能です。
C#でワークブックのVBAプロジェクトが署名されているかどうかを確認する
以下のコードは、ワークブックをロードし、Workbook.VbaProject.IsSignedプロパティを使用してそのVBAプロジェクトが署名されているかどうかをチェックします。プロパティはプロジェクトが署名されている場合は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); |