Description |
---|
Excerpt |
---|
Write-protects the worksheet. A user will not be able to modify the worksheet in Excel without entering the specified password. This method does not encrypt the worksheet. |
Signature | ||||
---|---|---|---|---|
| ||||
public void Protect(System.String password) |
Signature | ||||
---|---|---|---|---|
| ||||
Public Sub Protect(ByVal password As String) |
Parameters |
---|
Param | ||||
---|---|---|---|---|
| ||||
The password to use to protect the worksheet. If the password is "" or null, the worksheet will be protected without a password. |
Remarks |
---|
To further protect your spreadsheet, you can protect the Workbook's structure using the Workbook.Protect() method or password encrypt the file using the Workbook.EncryptPassword property. |
Example | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|