ExpertXls Excel Library for .NET
ProtectWorkbook Method (protectWindow, protectStructure, password)
Namespaces ► ExpertXls.ExcelLib ► ExcelDocumentSecurity ► ProtectWorkbook(Boolean, Boolean, String)
ExpertXls Excel Library for .NET
Protects the workbook window and structure and sets a password to unprotect the workbook.
Declaration Syntax

C# | Visual Basic | Visual C++

    public void ProtectWorkbook(
    	bool protectWindow,
    	bool protectStructure,
    	string password
    )

    Public Sub ProtectWorkbook ( _
    	protectWindow As Boolean, _
    	protectStructure As Boolean, _
    	password As String _
    )

    public:
    void ProtectWorkbook(
    	bool protectWindow,
    	bool protectStructure,
    	String^ password
    )

Parameters

protectWindow (Boolean)
  When this flag is true the workbook window will be protected.

protectStructure (Boolean)
  When this flag is true the workbook structure is protected.

password (String)
  The password to be used to unprotect the workbook.

Assembly: ExpertXls.ExcelLib (Module: ExpertXls.ExcelLib) Version: 2.1.0.0 (2.1.0.0)