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 | isDeletingColumnsAllowed() | |
function | setDeletingColumnsAllowed(value) | |
Represents if the deletion of columns is allowed on a protected worksheet. | ||
function | isDeletingRowsAllowed() | |
function | setDeletingRowsAllowed(value) | |
Represents if the deletion of rows is allowed on a protected worksheet. | ||
function | isEditingContentsAllowed() | |
function | setEditingContentsAllowed(value) | |
Represents if the user is allowed to edit contents of locked cells on a protected worksheet. | ||
function | isEditingObjectsAllowed() | |
function | setEditingObjectsAllowed(value) | |
Represents if the user is allowed to manipulate drawing objects on a protected worksheet. | ||
function | isEditingScenariosAllowed() | |
function | setEditingScenariosAllowed(value) | |
Represents if the user is allowed to edit scenarios on a protected worksheet. | ||
function | isFilteringAllowed() | |
function | setFilteringAllowed(value) | |
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. | ||
function | isFormattingCellsAllowed() | |
function | setFormattingCellsAllowed(value) | |
Represents if the formatting of cells is allowed on a protected worksheet. | ||
function | isFormattingColumnsAllowed() | |
function | setFormattingColumnsAllowed(value) | |
Represents if the formatting of columns is allowed on a protected worksheet | ||
function | isFormattingRowsAllowed() | |
function | setFormattingRowsAllowed(value) | |
Represents if the formatting of rows is allowed on a protected worksheet | ||
function | isInsertingColumnsAllowed() | |
function | setInsertingColumnsAllowed(value) | |
Represents if the insertion of columns is allowed on a protected worksheet | ||
function | isInsertingHyperlinksAllowed() | |
function | ||
Represents if the insertion of hyperlinks is allowed on a protected worksheet | ||
function | isInsertingRowsAllowed() | |
function | setInsertingRowsAllowed(value) | |
Represents if the insertion of rows is allowed on a protected worksheet | ||
function | isProtectedWithPassword() | |
Indicates whether the worksheets is protected with password.
|
||
function | isSelectingLockedCellsAllowed() | |
function | ||
Represents if the user is allowed to select locked cells on a protected worksheet. | ||
function | isSelectingUnlockedCellsAllowed() | |
function | ||
Represents if the user is allowed to select unlocked cells on a protected worksheet. | ||
function | isSortingAllowed() | |
function | setSortingAllowed(value) | |
Represents if the sorting option is allowed on a protected worksheet. | ||
function | isUsingPivotTablesAllowed() | |
function | setUsingPivotTablesAllowed(value) | |
Represents if the user is allowed to manipulate pivot tables on a protected worksheet. | ||
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 isDeletingColumnsAllowed() / function setDeletingColumnsAllowed(value)
function getAllowDeletingRow() / function setAllowDeletingRow(value)
function isDeletingRowsAllowed() / function setDeletingRowsAllowed(value)
function getAllowFiltering() / function setAllowFiltering(value)
function isFilteringAllowed() / function setFilteringAllowed(value)
function getAllowFormattingCell() / function setAllowFormattingCell(value)
function isFormattingCellsAllowed() / function setFormattingCellsAllowed(value)
function getAllowFormattingColumn() / function setAllowFormattingColumn(value)
function isFormattingColumnsAllowed() / function setFormattingColumnsAllowed(value)
function getAllowFormattingRow() / function setAllowFormattingRow(value)
function isFormattingRowsAllowed() / function setFormattingRowsAllowed(value)
function getAllowInsertingColumn() / function setAllowInsertingColumn(value)
function isInsertingColumnsAllowed() / function setInsertingColumnsAllowed(value)
function getAllowInsertingHyperlink() / function setAllowInsertingHyperlink(value)
function isInsertingHyperlinksAllowed() / function setInsertingHyperlinksAllowed(value)
function getAllowInsertingRow() / function setAllowInsertingRow(value)
function isInsertingRowsAllowed() / function setInsertingRowsAllowed(value)
function getAllowSorting() / function setAllowSorting(value)
function isSortingAllowed() / function setSortingAllowed(value)
function getAllowUsingPivotTable() / function setAllowUsingPivotTable(value)
function isUsingPivotTablesAllowed() / function setUsingPivotTablesAllowed(value)
function getAllowEditingContent() / function setAllowEditingContent(value)
function isEditingContentsAllowed() / function setEditingContentsAllowed(value)
function getAllowEditingObject() / function setAllowEditingObject(value)
function isEditingObjectsAllowed() / function setEditingObjectsAllowed(value)
function getAllowEditingScenario() / function setAllowEditingScenario(value)
function isEditingScenariosAllowed() / function setEditingScenariosAllowed(value)
function getPassword() / function setPassword(value)
function isProtectedWithPassword()
function getAllowSelectingLockedCell() / function setAllowSelectingLockedCell(value)
function isSelectingLockedCellsAllowed() / function setSelectingLockedCellsAllowed(value)
function getAllowSelectingUnlockedCell() / function setAllowSelectingUnlockedCell(value)
function isSelectingUnlockedCellsAllowed() / function setSelectingUnlockedCellsAllowed(value)