[]
Removes worksheet protection by using the specified password.
Pass null only when the worksheet was protected without a password.
void Unprotect(string password = null)
Sub Unprotect(Optional password As String = Nothing)
| Type | Name | Description |
|---|---|---|
| string | password | The password used to remove worksheet protection, or null if the worksheet was protected without a password. |
worksheet.Range["A1"].Value = "Name";
worksheet.Protect();
worksheet.Unprotect();