 | WorkbookSetWorkbookProtection Method |
Sets or removes the workbook protection. If protectWindows and protectStructure are both false, the workbook will not be protected
Namespace: NanoXLSXAssembly: NanoXLSX (in NanoXLSX.dll) Version: 2.6.3+98f265239ae8df4639650ecd7029244cc5e52dfc
Syntaxpublic void SetWorkbookProtection(
bool state,
bool protectWindows,
bool protectStructure,
string password
)
Parameters
- state Boolean
- If true, the workbook will be protected, otherwise not
- protectWindows Boolean
- If true, the windows will be locked if the workbook is protected
- protectStructure Boolean
- If true, the structure will be locked if the workbook is protected
- password String
- Optional password. If null or empty, no password will be set in case of protection
See Also