public void Protect( bool allowEditStructure, bool allowEditWindows )
When a Workbook is protected without a password, the end user may unprotect the Workbook in Excel without having to supply a password. To programatically unprotect a Workbook, one may use the Unprotect method.
When a Workbook is protected, the values of the properties of the WorkbookProtection instance from this Workbook's Protection property indicate the disabled operations.
Note: If IsProtected is already true, the method will be ignored.
Target Platforms: Android 4.4+, iOS 8+
Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+