Example:
$workbook = new cells\Workbook(); $worksheet = $workbook->getWorksheets()->get(0); $worksheet->getProtection()->setAllowSelectingLockedCell(false); //Allowing users to select unlocked cells of the worksheet $worksheet->getProtection()->setAllowSelectingUnlockedCell(true);
| Property Getters/Setters Summary | ||
|---|---|---|
function | getAllowDeletingColumn() | |
function | setAllowDeletingColumn(value) | |
| Represents if the deletion of columns is allowed on a protected worksheet. | ||
function | getAllowDeletingRow() | |
function | setAllowDeletingRow(value) | |
| Represents if the deletion of rows is allowed on a protected worksheet. | ||
function | getAllowEditingContent() | |
function | setAllowEditingContent(value) | |
| Represents if the user is allowed to edit contents of locked cells on a protected worksheet. | ||
function | getAllowEditingObject() | |
function | setAllowEditingObject(value) | |
| Represents if the user is allowed to manipulate drawing objects on a protected worksheet. | ||
function | getAllowEditingScenario() | |
function | setAllowEditingScenario(value) | |
| Represents if the user is allowed to edit scenarios on a protected worksheet. | ||
function | getAllowFiltering() | |
function | setAllowFiltering(value) | |
| Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. | ||
function | getAllowFormattingCell() | |
function | setAllowFormattingCell(value) | |
| Represents if the formatting of cells is allowed on a protected worksheet. | ||
function | getAllowFormattingColumn() | |
function | setAllowFormattingColumn(value) | |
| Represents if the formatting of columns is allowed on a protected worksheet | ||
function | getAllowFormattingRow() | |
function | setAllowFormattingRow(value) | |
| Represents if the formatting of rows is allowed on a protected worksheet | ||
function | getAllowInsertingColumn() | |
function | setAllowInsertingColumn(value) | |
| Represents if the insertion of columns is allowed on a protected worksheet | ||
function | getAllowInsertingHyperlink() | |
function | setAllowInsertingHyperlink(value) | |
| Represents if the insertion of hyperlinks is allowed on a protected worksheet | ||
function | getAllowInsertingRow() | |
function | setAllowInsertingRow(value) | |
| Represents if the insertion of rows is allowed on a protected worksheet | ||
function | getAllowSelectingLockedCell() | |
function | setAllowSelectingLockedCell(value) | |
| Represents if the user is allowed to select locked cells on a protected worksheet. | ||
function | getAllowSelectingUnlockedCell() | |
function | ||
| Represents if the user is allowed to select unlocked cells on a protected worksheet. | ||
function | getAllowSorting() | |
function | setAllowSorting(value) | |
| Represents if the sorting option is allowed on a protected worksheet. | ||
function | getAllowUsingPivotTable() | |
function | setAllowUsingPivotTable(value) | |
| Represents if the user is allowed to manipulate pivot tables on a protected worksheet. | ||
function | isProtectedWithPassword() | |
Indicates whether the worksheets is protected with password.
|
||
function | getPassword() | |
function | setPassword(value) | |
| Represents the password to protect the worksheet. | ||
| Method Summary | ||
|---|---|---|
function | copy(source) | |
Copy protection info.
|
||
function | getPasswordHash() | |
Gets the hash of current password.
|
||
function | verifyPassword(password) | |
Verifies password.
|
||
function getAllowDeletingColumn() / function setAllowDeletingColumn(value)
function getAllowDeletingRow() / function setAllowDeletingRow(value)
function getAllowFiltering() / function setAllowFiltering(value)
function getAllowFormattingCell() / function setAllowFormattingCell(value)
function getAllowFormattingColumn() / function setAllowFormattingColumn(value)
function getAllowFormattingRow() / function setAllowFormattingRow(value)
function getAllowInsertingColumn() / function setAllowInsertingColumn(value)
function getAllowInsertingHyperlink() / function setAllowInsertingHyperlink(value)
function getAllowInsertingRow() / function setAllowInsertingRow(value)
function getAllowSorting() / function setAllowSorting(value)
function getAllowUsingPivotTable() / function setAllowUsingPivotTable(value)
function getAllowEditingContent() / function setAllowEditingContent(value)
function getAllowEditingObject() / function setAllowEditingObject(value)
function getAllowEditingScenario() / function setAllowEditingScenario(value)
function getAllowSelectingLockedCell() / function setAllowSelectingLockedCell(value)
function getAllowSelectingUnlockedCell() / function setAllowSelectingUnlockedCell(value)
function getPassword() / function setPassword(value)
function isProtectedWithPassword()