Protection class

Protection class

Represents the various types of protection options available for a worksheet.

The Protection type exposes the following members:

Properties

PropertyDescription
allow_deleting_columnRepresents if the deletion of columns is allowed on a protected worksheet.
is_deleting_columns_allowedRepresents if the deletion of columns is allowed on a protected worksheet.
allow_deleting_rowRepresents if the deletion of rows is allowed on a protected worksheet.
is_deleting_rows_allowedRepresents if the deletion of rows is allowed on a protected worksheet.
allow_filteringRepresents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
is_filtering_allowedRepresents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
allow_formatting_cellRepresents if the formatting of cells is allowed on a protected worksheet.
is_formatting_cells_allowedRepresents if the formatting of cells is allowed on a protected worksheet.
allow_formatting_columnRepresents if the formatting of columns is allowed on a protected worksheet
is_formatting_columns_allowedRepresents if the formatting of columns is allowed on a protected worksheet
allow_formatting_rowRepresents if the formatting of rows is allowed on a protected worksheet
is_formatting_rows_allowedRepresents if the formatting of rows is allowed on a protected worksheet
allow_inserting_columnRepresents if the insertion of columns is allowed on a protected worksheet
is_inserting_columns_allowedRepresents if the insertion of columns is allowed on a protected worksheet
allow_inserting_hyperlinkRepresents if the insertion of hyperlinks is allowed on a protected worksheet
is_inserting_hyperlinks_allowedRepresents if the insertion of hyperlinks is allowed on a protected worksheet
allow_inserting_rowRepresents if the insertion of rows is allowed on a protected worksheet
is_inserting_rows_allowedRepresents if the insertion of rows is allowed on a protected worksheet
allow_sortingRepresents if the sorting option is allowed on a protected worksheet.
is_sorting_allowedRepresents if the sorting option is allowed on a protected worksheet.
allow_using_pivot_tableRepresents if the user is allowed to manipulate pivot tables on a protected worksheet.
is_using_pivot_tables_allowedRepresents if the user is allowed to manipulate pivot tables on a protected worksheet.
allow_editing_contentRepresents if the user is allowed to edit contents of locked cells on a protected worksheet.
is_editing_contents_allowedRepresents if the user is allowed to edit contents of locked cells on a protected worksheet.
allow_editing_objectRepresents if the user is allowed to manipulate drawing objects on a protected worksheet.
is_editing_objects_allowedRepresents if the user is allowed to manipulate drawing objects on a protected worksheet.
allow_editing_scenarioRepresents if the user is allowed to edit scenarios on a protected worksheet.
is_editing_scenarios_allowedRepresents if the user is allowed to edit scenarios on a protected worksheet.
passwordRepresents the password to protect the worksheet.
is_protected_with_passwordIndicates whether the worksheets is protected with password.
allow_selecting_locked_cellRepresents if the user is allowed to select locked cells on a protected worksheet.
is_selecting_locked_cells_allowedRepresents if the user is allowed to select locked cells on a protected worksheet.
allow_selecting_unlocked_cellRepresents if the user is allowed to select unlocked cells on a protected worksheet.
is_selecting_unlocked_cells_allowedRepresents if the user is allowed to select unlocked cells on a protected worksheet.

Methods

MethodDescription
copyCopy protection info.
get_password_hashGets the hash of current password.
verify_passwordVerifies password.

Example

from aspose.cells import Workbook

# Instantiating a Workbook object
workbook = Workbook()
worksheet = workbook.worksheets[0]
# Allowing users to select locked cells of the worksheet
worksheet.protection.allow_selecting_locked_cell = True
# Allowing users to select unlocked cells of the worksheet
worksheet.protection.allow_selecting_unlocked_cell = True

See Also