NativeExcel2 for .Net Developer's Reference

IWorksheet.UnprotectMethod

Removes protection from a sheet. This method has no effect if the sheet isn't protected.

Overload List

Removes protection from a sheet without using a password.

[Visual Basic] SubUnprotect()
[C#] voidUnprotect();
[C++] voidUnprotect();
[JScript] functionUnprotect();

Removes protection from a worksheet with using a password.

[Visual Basic] SubUnprotect(ByValString)
[C#] voidUnprotect(string);
[C++] voidUnprotect(String*);
[JScript] functionUnprotect(String);

Example

This example removes protection from the worksheet one.

[C#]
book.Worksheets[1].Unprotect("Pass1234"); 
[VisualBasic]
book.Worksheets(1).Unprotect("Pass1234")
[C++]
book->Worksheets->Item[1]->Unprotect(S"Pass1234");

See Also

IWorksheet Interface | NativeExcel Namespace | Protect Method