
## WriteProtection class

Specifies write protection settings for a workbook.

## Methods

| Name | Description |
| --- | --- |
| [getAuthor()](#getauthor) | Gets and sets the author. |
| [getPassword()](#getpassword) | Sets the protected password to modify the file. |
| [getRecommendReadOnly()](#getrecommendreadonly) | Indicates if the Read Only Recommended option is selected. |
| [isWriteProtected()](#iswriteprotected) | Indicates whether this workbook is write protected. |
| [setAuthor()](#setauthor) | Gets and sets the author. |
| [setPassword()](#setpassword) | Sets the protected password to modify the file. |
| [setRecommendReadOnly()](#setrecommendreadonly) | Indicates if the Read Only Recommended option is selected. |
| [validatePassword(password)](#validatepassword) | Returns true if the specified password is the same as the write-protection password the file was protected with. |

### getAuthor() {#getauthor}

Gets and sets the author.

### getPassword() {#getpassword}

Sets the protected password to modify the file.

### getRecommendReadOnly() {#getrecommendreadonly}

Indicates if the Read Only Recommended option is selected.

### isWriteProtected() {#iswriteprotected}

Indicates whether this workbook is write protected.

### setAuthor() {#setauthor}

Gets and sets the author.

### setPassword() {#setpassword}

Sets the protected password to modify the file.

### setRecommendReadOnly() {#setrecommendreadonly}

Indicates if the Read Only Recommended option is selected.

### validatePassword(password) {#validatepassword}

Returns true if the specified password is the same as the write-protection password the file was protected with.

| Parameter | Type | Description |
| --- | --- | --- |
| password | String | The specified password. |

**Returns:** boolean — `boolean`
