Check if VBA Project is Protected and Locked for Viewing with Golang via C++

Check if VBA Project is Protected and Locked for Viewing in C++

Aspose.Cells allows you to check if the VBA (Visual Basic for Applications) Project of an Excel file is protected and locked for viewing. For this, the API provides the VbaProject.GetIslockedForViewing() property. If it is locked for viewing, then the VbaProject.GetIslockedForViewing() property returns true.

Sample Code

The following sample code loads the sample Excel file and checks if the VBA (Visual Basic for Applications) Project of the Excel file is protected and locked for viewing. Please also see its Console Output for a reference.

Console Output

This is the console output of the above sample code when executed with the provided sample Excel file.

Is VBA Project Locked for Viewing: True