Example:
# Instantiating a Workbook object workbook = Workbook() # Adding a new worksheet to the Excel object sheetIndex = workbook.getWorksheets().add() worksheet = workbook.getWorksheets().get(sheetIndex) # Allowing users to select locked cells of the worksheet worksheet.getProtection().setAllowSelectingLockedCell(True) # Allowing users to select unlocked cells of the worksheet worksheet.getProtection().setAllowSelectingUnlockedCell(True)
Property Getters/Setters Summary | ||
---|---|---|
method | getAllowDeletingColumn() | |
method | setAllowDeletingColumn(value) | |
Represents if the deletion of columns is allowed on a protected worksheet. | ||
method | getAllowDeletingRow() | |
method | setAllowDeletingRow(value) | |
Represents if the deletion of rows is allowed on a protected worksheet. | ||
method | getAllowEditingContent() | |
method | setAllowEditingContent(value) | |
Represents if the user is allowed to edit contents of locked cells on a protected worksheet. | ||
method | getAllowEditingObject() | |
method | setAllowEditingObject(value) | |
Represents if the user is allowed to manipulate drawing objects on a protected worksheet. | ||
method | getAllowEditingScenario() | |
method | setAllowEditingScenario(value) | |
Represents if the user is allowed to edit scenarios on a protected worksheet. | ||
method | getAllowFiltering() | |
method | setAllowFiltering(value) | |
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. | ||
method | getAllowFormattingCell() | |
method | setAllowFormattingCell(value) | |
Represents if the formatting of cells is allowed on a protected worksheet. | ||
method | getAllowFormattingColumn() | |
method | setAllowFormattingColumn(value) | |
Represents if the formatting of columns is allowed on a protected worksheet | ||
method | getAllowFormattingRow() | |
method | setAllowFormattingRow(value) | |
Represents if the formatting of rows is allowed on a protected worksheet | ||
method | getAllowInsertingColumn() | |
method | setAllowInsertingColumn(value) | |
Represents if the insertion of columns is allowed on a protected worksheet | ||
method | getAllowInsertingHyperlink() | |
method | setAllowInsertingHyperlink(value) | |
Represents if the insertion of hyperlinks is allowed on a protected worksheet | ||
method | getAllowInsertingRow() | |
method | setAllowInsertingRow(value) | |
Represents if the insertion of rows is allowed on a protected worksheet | ||
method | getAllowSelectingLockedCell() | |
method | setAllowSelectingLockedCell(value) | |
Represents if the user is allowed to select locked cells on a protected worksheet. | ||
method | getAllowSelectingUnlockedCell() | |
method | ||
Represents if the user is allowed to select unlocked cells on a protected worksheet. | ||
method | getAllowSorting() | |
method | setAllowSorting(value) | |
Represents if the sorting option is allowed on a protected worksheet. | ||
method | getAllowUsingPivotTable() | |
method | setAllowUsingPivotTable(value) | |
Represents if the user is allowed to manipulate pivot tables on a protected worksheet. | ||
method | isDeletingColumnsAllowed() | |
method | setDeletingColumnsAllowed(value) | |
Represents if the deletion of columns is allowed on a protected worksheet. | ||
method | isDeletingRowsAllowed() | |
method | setDeletingRowsAllowed(value) | |
Represents if the deletion of rows is allowed on a protected worksheet. | ||
method | isEditingContentsAllowed() | |
method | setEditingContentsAllowed(value) | |
Represents if the user is allowed to edit contents of locked cells on a protected worksheet. | ||
method | isEditingObjectsAllowed() | |
method | setEditingObjectsAllowed(value) | |
Represents if the user is allowed to manipulate drawing objects on a protected worksheet. | ||
method | isEditingScenariosAllowed() | |
method | setEditingScenariosAllowed(value) | |
Represents if the user is allowed to edit scenarios on a protected worksheet. | ||
method | isFilteringAllowed() | |
method | setFilteringAllowed(value) | |
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. | ||
method | isFormattingCellsAllowed() | |
method | setFormattingCellsAllowed(value) | |
Represents if the formatting of cells is allowed on a protected worksheet. | ||
method | isFormattingColumnsAllowed() | |
method | setFormattingColumnsAllowed(value) | |
Represents if the formatting of columns is allowed on a protected worksheet | ||
method | isFormattingRowsAllowed() | |
method | setFormattingRowsAllowed(value) | |
Represents if the formatting of rows is allowed on a protected worksheet | ||
method | isInsertingColumnsAllowed() | |
method | setInsertingColumnsAllowed(value) | |
Represents if the insertion of columns is allowed on a protected worksheet | ||
method | isInsertingHyperlinksAllowed() | |
method | ||
Represents if the insertion of hyperlinks is allowed on a protected worksheet | ||
method | isInsertingRowsAllowed() | |
method | setInsertingRowsAllowed(value) | |
Represents if the insertion of rows is allowed on a protected worksheet | ||
method | isProtectedWithPassword() | |
Indicates whether the worksheets is protected with password.
|
||
method | isSelectingLockedCellsAllowed() | |
method | ||
Represents if the user is allowed to select locked cells on a protected worksheet. | ||
method | isSelectingUnlockedCellsAllowed() | |
method | ||
Represents if the user is allowed to select unlocked cells on a protected worksheet. | ||
method | isSortingAllowed() | |
method | setSortingAllowed(value) | |
Represents if the sorting option is allowed on a protected worksheet. | ||
method | isUsingPivotTablesAllowed() | |
method | setUsingPivotTablesAllowed(value) | |
Represents if the user is allowed to manipulate pivot tables on a protected worksheet. | ||
method | getPassword() | |
method | setPassword(value) | |
Represents the password to protect the worksheet. |
Method Summary | ||
---|---|---|
method | copy(source) | |
Copy protection info.
|
||
method | getPasswordHash() | |
Gets the hash of current password.
|
||
method | verifyPassword(password) | |
Verifies password.
|
boolean getAllowDeletingColumn() / setAllowDeletingColumn(value)
boolean isDeletingColumnsAllowed() / setDeletingColumnsAllowed(value)
boolean getAllowDeletingRow() / setAllowDeletingRow(value)
boolean isDeletingRowsAllowed() / setDeletingRowsAllowed(value)
boolean getAllowFiltering() / setAllowFiltering(value)
boolean isFilteringAllowed() / setFilteringAllowed(value)
boolean getAllowFormattingCell() / setAllowFormattingCell(value)
boolean isFormattingCellsAllowed() / setFormattingCellsAllowed(value)
boolean getAllowFormattingColumn() / setAllowFormattingColumn(value)
boolean isFormattingColumnsAllowed() / setFormattingColumnsAllowed(value)
boolean getAllowFormattingRow() / setAllowFormattingRow(value)
boolean isFormattingRowsAllowed() / setFormattingRowsAllowed(value)
boolean getAllowInsertingColumn() / setAllowInsertingColumn(value)
boolean isInsertingColumnsAllowed() / setInsertingColumnsAllowed(value)
boolean getAllowInsertingHyperlink() / setAllowInsertingHyperlink(value)
boolean isInsertingHyperlinksAllowed() / setInsertingHyperlinksAllowed(value)
boolean getAllowInsertingRow() / setAllowInsertingRow(value)
boolean isInsertingRowsAllowed() / setInsertingRowsAllowed(value)
boolean getAllowSorting() / setAllowSorting(value)
boolean isSortingAllowed() / setSortingAllowed(value)
boolean getAllowUsingPivotTable() / setAllowUsingPivotTable(value)
boolean isUsingPivotTablesAllowed() / setUsingPivotTablesAllowed(value)
boolean getAllowEditingContent() / setAllowEditingContent(value)
boolean isEditingContentsAllowed() / setEditingContentsAllowed(value)
boolean getAllowEditingObject() / setAllowEditingObject(value)
boolean isEditingObjectsAllowed() / setEditingObjectsAllowed(value)
boolean getAllowEditingScenario() / setAllowEditingScenario(value)
boolean isEditingScenariosAllowed() / setEditingScenariosAllowed(value)
String getPassword() / setPassword(value)
boolean isProtectedWithPassword()
boolean getAllowSelectingLockedCell() / setAllowSelectingLockedCell(value)
boolean isSelectingLockedCellsAllowed() / setSelectingLockedCellsAllowed(value)
boolean getAllowSelectingUnlockedCell() / setAllowSelectingUnlockedCell(value)
boolean isSelectingUnlockedCellsAllowed() / setSelectingUnlockedCellsAllowed(value)