Methods

copy(source)

Copy protection info.

Parameter

Name Type Optional Description

source

Protection

 

getAllowDeletingColumn()

Represents if the deletion of columns is allowed on a protected worksheet. The columns containing the cells to be deleted must be unlocked when the sheet is protected, and "Select unlocked cells" option must be enabled.

getAllowDeletingRow()

Represents if the deletion of rows is allowed on a protected worksheet. The rows containing the cells to be deleted must be unlocked when the sheet is protected, and "Select unlocked cells" option must be enabled.

getAllowEditingContent()

Represents if the user is allowed to edit contents of locked cells on a protected worksheet.

getAllowEditingObject()

Represents if the user is allowed to manipulate drawing objects on a protected worksheet.

getAllowEditingScenario()

Represents if the user is allowed to edit scenarios on a protected worksheet.

getAllowFiltering()

Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.

getAllowFormattingCell()

Represents if the formatting of cells is allowed on a protected worksheet.

getAllowFormattingColumn()

Represents if the formatting of columns is allowed on a protected worksheet

getAllowFormattingRow()

Represents if the formatting of rows is allowed on a protected worksheet

getAllowInsertingColumn()

Represents if the insertion of columns is allowed on a protected worksheet

Represents if the insertion of hyperlinks is allowed on a protected worksheet

getAllowInsertingRow()

Represents if the insertion of rows is allowed on a protected worksheet

getAllowSelectingLockedCell()

Represents if the user is allowed to select locked cells on a protected worksheet.

getAllowSelectingUnlockedCell()

Represents if the user is allowed to select unlocked cells on a protected worksheet.

getAllowSorting()

Represents if the sorting option is allowed on a protected worksheet.

getAllowUsingPivotTable()

Represents if the user is allowed to manipulate pivot tables on a protected worksheet.

getPassword()

Represents the password to protect the worksheet. If password is set to null or blank string, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook.

getPasswordHash()

Gets the hash of current password.

isProtectedWithPassword()

Indicates whether the worksheets is protected with password.

setAllowDeletingColumn()

Represents if the deletion of columns is allowed on a protected worksheet. The columns containing the cells to be deleted must be unlocked when the sheet is protected, and "Select unlocked cells" option must be enabled.

setAllowDeletingRow()

Represents if the deletion of rows is allowed on a protected worksheet. The rows containing the cells to be deleted must be unlocked when the sheet is protected, and "Select unlocked cells" option must be enabled.

setAllowEditingContent()

Represents if the user is allowed to edit contents of locked cells on a protected worksheet.

setAllowEditingObject()

Represents if the user is allowed to manipulate drawing objects on a protected worksheet.

setAllowEditingScenario()

Represents if the user is allowed to edit scenarios on a protected worksheet.

setAllowFiltering()

Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.

setAllowFormattingCell()

Represents if the formatting of cells is allowed on a protected worksheet.

setAllowFormattingColumn()

Represents if the formatting of columns is allowed on a protected worksheet

setAllowFormattingRow()

Represents if the formatting of rows is allowed on a protected worksheet

setAllowInsertingColumn()

Represents if the insertion of columns is allowed on a protected worksheet

Represents if the insertion of hyperlinks is allowed on a protected worksheet

setAllowInsertingRow()

Represents if the insertion of rows is allowed on a protected worksheet

setAllowSelectingLockedCell()

Represents if the user is allowed to select locked cells on a protected worksheet.

setAllowSelectingUnlockedCell()

Represents if the user is allowed to select unlocked cells on a protected worksheet.

setAllowSorting()

Represents if the sorting option is allowed on a protected worksheet.

setAllowUsingPivotTable()

Represents if the user is allowed to manipulate pivot tables on a protected worksheet.

setPassword()

Represents the password to protect the worksheet. If password is set to null or blank string, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook.

verifyPassword(password) → boolean

Verifies password.

Parameter

Name Type Optional Description

password

String

 

The password.

Returns

boolean