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 | setAllowSelectingUnlockedCell(value) | |
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 | setInsertingHyperlinksAllowed(value) | |
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 | setSelectingLockedCellsAllowed(value) | |
Represents if the user is allowed to select locked cells on a protected worksheet. | ||
method | isSelectingUnlockedCellsAllowed() | |
method | setSelectingUnlockedCellsAllowed(value) | |
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. |
Property Getters/Setters Detail |
---|
getAllowDeletingColumn/setAllowDeletingColumn : boolean | |
boolean getAllowDeletingColumn() / setAllowDeletingColumn(value) |
isDeletingColumnsAllowed/setDeletingColumnsAllowed : boolean | |
boolean isDeletingColumnsAllowed() / setDeletingColumnsAllowed(value) |
getAllowDeletingRow/setAllowDeletingRow : boolean | |
boolean getAllowDeletingRow() / setAllowDeletingRow(value) |
isDeletingRowsAllowed/setDeletingRowsAllowed : boolean | |
boolean isDeletingRowsAllowed() / setDeletingRowsAllowed(value) |
getAllowFiltering/setAllowFiltering : boolean | |
boolean getAllowFiltering() / setAllowFiltering(value) |
isFilteringAllowed/setFilteringAllowed : boolean | |
boolean isFilteringAllowed() / setFilteringAllowed(value) |
getAllowFormattingCell/setAllowFormattingCell : boolean | |
boolean getAllowFormattingCell() / setAllowFormattingCell(value) |
isFormattingCellsAllowed/setFormattingCellsAllowed : boolean | |
boolean isFormattingCellsAllowed() / setFormattingCellsAllowed(value) |
getAllowFormattingColumn/setAllowFormattingColumn : boolean | |
boolean getAllowFormattingColumn() / setAllowFormattingColumn(value) |
isFormattingColumnsAllowed/setFormattingColumnsAllowed : boolean | |
boolean isFormattingColumnsAllowed() / setFormattingColumnsAllowed(value) |
getAllowFormattingRow/setAllowFormattingRow : boolean | |
boolean getAllowFormattingRow() / setAllowFormattingRow(value) |
isFormattingRowsAllowed/setFormattingRowsAllowed : boolean | |
boolean isFormattingRowsAllowed() / setFormattingRowsAllowed(value) |
getAllowInsertingColumn/setAllowInsertingColumn : boolean | |
boolean getAllowInsertingColumn() / setAllowInsertingColumn(value) |
isInsertingColumnsAllowed/setInsertingColumnsAllowed : boolean | |
boolean isInsertingColumnsAllowed() / setInsertingColumnsAllowed(value) |
getAllowInsertingHyperlink/setAllowInsertingHyperlink : boolean | |
boolean getAllowInsertingHyperlink() / setAllowInsertingHyperlink(value) |
isInsertingHyperlinksAllowed/setInsertingHyperlinksAllowed : boolean | |
boolean isInsertingHyperlinksAllowed() / setInsertingHyperlinksAllowed(value) |
getAllowInsertingRow/setAllowInsertingRow : boolean | |
boolean getAllowInsertingRow() / setAllowInsertingRow(value) |
isInsertingRowsAllowed/setInsertingRowsAllowed : boolean | |
boolean isInsertingRowsAllowed() / setInsertingRowsAllowed(value) |
getAllowSorting/setAllowSorting : boolean | |
boolean getAllowSorting() / setAllowSorting(value) |
isSortingAllowed/setSortingAllowed : boolean | |
boolean isSortingAllowed() / setSortingAllowed(value) |
getAllowUsingPivotTable/setAllowUsingPivotTable : boolean | |
boolean getAllowUsingPivotTable() / setAllowUsingPivotTable(value) |
isUsingPivotTablesAllowed/setUsingPivotTablesAllowed : boolean | |
boolean isUsingPivotTablesAllowed() / setUsingPivotTablesAllowed(value) |
getAllowEditingContent/setAllowEditingContent : boolean | |
boolean getAllowEditingContent() / setAllowEditingContent(value) |
isEditingContentsAllowed/setEditingContentsAllowed : boolean | |
boolean isEditingContentsAllowed() / setEditingContentsAllowed(value) |
getAllowEditingObject/setAllowEditingObject : boolean | |
boolean getAllowEditingObject() / setAllowEditingObject(value) |
isEditingObjectsAllowed/setEditingObjectsAllowed : boolean | |
boolean isEditingObjectsAllowed() / setEditingObjectsAllowed(value) |
getAllowEditingScenario/setAllowEditingScenario : boolean | |
boolean getAllowEditingScenario() / setAllowEditingScenario(value) |
isEditingScenariosAllowed/setEditingScenariosAllowed : boolean | |
boolean isEditingScenariosAllowed() / setEditingScenariosAllowed(value) |
getPassword/setPassword : String | |
String getPassword() / setPassword(value) |
isProtectedWithPassword : boolean | |
boolean isProtectedWithPassword() |
getAllowSelectingLockedCell/setAllowSelectingLockedCell : boolean | |
boolean getAllowSelectingLockedCell() / setAllowSelectingLockedCell(value) |
isSelectingLockedCellsAllowed/setSelectingLockedCellsAllowed : boolean | |
boolean isSelectingLockedCellsAllowed() / setSelectingLockedCellsAllowed(value) |
getAllowSelectingUnlockedCell/setAllowSelectingUnlockedCell : boolean | |
boolean getAllowSelectingUnlockedCell() / setAllowSelectingUnlockedCell(value) |
isSelectingUnlockedCellsAllowed/setSelectingUnlockedCellsAllowed : boolean | |
boolean isSelectingUnlockedCellsAllowed() / setSelectingUnlockedCellsAllowed(value) |
Method Detail |
---|
copy | |
copy(source) |
source: Protection
- getPasswordHash | |
int getPasswordHash() |
verifyPassword | |
boolean verifyPassword(password) |
password: String
- The password.