ExpertXls Excel Library for .NET
ProtectWorksheet Method (password, allowFlags)
Namespaces ► ExpertXls.ExcelLib ► ExcelWorksheetSecurity ► ProtectWorksheet(String, ExcelProtectionAllowFlags)
ExpertXls Excel Library for .NET
Protects the worksheet and allows only the operations specified by the protection flags and set a password required to unprotect the worksheet.
Declaration Syntax

C# | Visual Basic | Visual C++

    public void ProtectWorksheet(
    	string password,
    	ExcelProtectionAllowFlags allowFlags
    )

    Public Sub ProtectWorksheet ( _
    	password As String, _
    	allowFlags As ExcelProtectionAllowFlags _
    )

    public:
    void ProtectWorksheet(
    	String^ password,
    	ExcelProtectionAllowFlags allowFlags
    )

Parameters

password (String)
  The password.

allowFlags (ExcelProtectionAllowFlags)
  The flags specifying the operations allowed after protection.

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