-
java.lang.Object
- com.aspose.cells.Protection
public class Protection
extends java.lang.Object
Represents the various types of protection options available for a worksheet.
Only used in ExcelXP and above version.
Example:
//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 |
boolean | getAllowDeletingColumn() | |
void
| | |
|
Represents if the deletion of columns is allowed on a protected worksheet.
|
boolean | getAllowDeletingRow() | |
void
| | |
|
Represents if the deletion of rows is allowed on a protected worksheet.
|
boolean | getAllowEditingContent() | |
void
| | |
|
Represents if the user is allowed to edit contents of locked cells on a protected worksheet.
|
boolean | getAllowEditingObject() | |
void
| | |
|
Represents if the user is allowed to manipulate drawing objects on a protected worksheet.
|
boolean | getAllowEditingScenario() | |
void
| | |
|
Represents if the user is allowed to edit scenarios on a protected worksheet.
|
boolean | getAllowFiltering() | |
void
| | |
|
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
|
boolean | getAllowFormattingCell() | |
void
| | |
|
Represents if the formatting of cells is allowed on a protected worksheet.
|
boolean | getAllowFormattingColumn() | |
void
| | |
|
Represents if the formatting of columns is allowed on a protected worksheet
|
boolean | getAllowFormattingRow() | |
void
| | |
|
Represents if the formatting of rows is allowed on a protected worksheet
|
boolean | getAllowInsertingColumn() | |
void
| | |
|
Represents if the insertion of columns is allowed on a protected worksheet
|
boolean | getAllowInsertingHyperlink() | |
void
| | |
|
Represents if the insertion of hyperlinks is allowed on a protected worksheet
|
boolean | getAllowInsertingRow() | |
void
| | |
|
Represents if the insertion of rows is allowed on a protected worksheet
|
boolean | getAllowSelectingLockedCell() | |
void
| | |
|
Represents if the user is allowed to select locked cells on a protected worksheet.
|
boolean | getAllowSelectingUnlockedCell() | |
void
| | |
|
Represents if the user is allowed to select unlocked cells on a protected worksheet.
|
boolean | getAllowSorting() | |
void
| | |
|
Represents if the sorting option is allowed on a protected worksheet.
|
boolean | getAllowUsingPivotTable() | |
void
| | |
|
Represents if the user is allowed to manipulate pivot tables on a protected worksheet.
|
boolean | isDeletingColumnsAllowed() | |
void
| | |
|
Represents if the deletion of columns is allowed on a protected worksheet.
|
boolean | isDeletingRowsAllowed() | |
void
| | |
|
Represents if the deletion of rows is allowed on a protected worksheet.
|
boolean | isEditingContentsAllowed() | |
void
| | |
|
Represents if the user is allowed to edit contents of locked cells on a protected worksheet.
|
boolean | isEditingObjectsAllowed() | |
void
| | |
|
Represents if the user is allowed to manipulate drawing objects on a protected worksheet.
|
boolean | isEditingScenariosAllowed() | |
void
| | |
|
Represents if the user is allowed to edit scenarios on a protected worksheet.
|
boolean | isFilteringAllowed() | |
void
| | |
|
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
|
boolean | isFormattingCellsAllowed() | |
void
| | |
|
Represents if the formatting of cells is allowed on a protected worksheet.
|
boolean | isFormattingColumnsAllowed() | |
void
| | |
|
Represents if the formatting of columns is allowed on a protected worksheet
|
boolean | isFormattingRowsAllowed() | |
void
| | |
|
Represents if the formatting of rows is allowed on a protected worksheet
|
boolean | isInsertingColumnsAllowed() | |
void
| | |
|
Represents if the insertion of columns is allowed on a protected worksheet
|
boolean | isInsertingHyperlinksAllowed() | |
void
| | |
|
Represents if the insertion of hyperlinks is allowed on a protected worksheet
|
boolean | isInsertingRowsAllowed() | |
void
| | |
|
Represents if the insertion of rows is allowed on a protected worksheet
|
boolean | isProtectedWithPassword() | |
|
Indicates whether the worksheets is protected with password.
|
boolean | isSelectingLockedCellsAllowed() | |
void
| | |
|
Represents if the user is allowed to select locked cells on a protected worksheet.
|
boolean | isSelectingUnlockedCellsAllowed() | |
void
| | |
|
Represents if the user is allowed to select unlocked cells on a protected worksheet.
|
boolean | isSortingAllowed() | |
void
| | |
|
Represents if the sorting option is allowed on a protected worksheet.
|
boolean | isUsingPivotTablesAllowed() | |
void
| | |
|
Represents if the user is allowed to manipulate pivot tables on a protected worksheet.
|
java.lang.String | getPassword() | |
void
| | |
|
Represents the password to protect the worksheet.
|
-
Property Getters/Setters Detail
getAllowDeletingColumn/setAllowDeletingColumn
public boolean getAllowDeletingColumn() / public void setAllowDeletingColumn(boolean value)
Represents if the deletion of columns is allowed on a protected worksheet.
The columns containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled.
isDeletingColumnsAllowed/setDeletingColumnsAllowed
public boolean isDeletingColumnsAllowed() / public void setDeletingColumnsAllowed(boolean value)
Represents if the deletion of columns is allowed on a protected worksheet.
The columns containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled. NOTE: This member is now obsolete. Instead,
please use Protection.AllowDeletingColumn property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
getAllowDeletingRow/setAllowDeletingRow
public boolean getAllowDeletingRow() / public void setAllowDeletingRow(boolean value)
Represents if the deletion of rows is allowed on a protected worksheet.
The rows containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled.
isDeletingRowsAllowed/setDeletingRowsAllowed
public boolean isDeletingRowsAllowed() / public void setDeletingRowsAllowed(boolean value)
Represents if the deletion of rows is allowed on a protected worksheet.
The rows containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled. NOTE: This member is now obsolete. Instead,
please use Protection.AllowDeletingRow property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isFilteringAllowed/setFilteringAllowed
public boolean isFilteringAllowed() / public void setFilteringAllowed(boolean value)
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFiltering property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isFormattingCellsAllowed/setFormattingCellsAllowed
public boolean isFormattingCellsAllowed() / public void setFormattingCellsAllowed(boolean value)
Represents if the formatting of cells is allowed on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFormattingCell property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isFormattingColumnsAllowed/setFormattingColumnsAllowed
public boolean isFormattingColumnsAllowed() / public void setFormattingColumnsAllowed(boolean value)
Represents if the formatting of columns is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFormattingColumn property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isFormattingRowsAllowed/setFormattingRowsAllowed
public boolean isFormattingRowsAllowed() / public void setFormattingRowsAllowed(boolean value)
Represents if the formatting of rows is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFormattingRow property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isInsertingColumnsAllowed/setInsertingColumnsAllowed
public boolean isInsertingColumnsAllowed() / public void setInsertingColumnsAllowed(boolean value)
Represents if the insertion of columns is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowInsertingColumn property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isInsertingHyperlinksAllowed/setInsertingHyperlinksAllowed
public boolean isInsertingHyperlinksAllowed() / public void setInsertingHyperlinksAllowed(boolean value)
Represents if the insertion of hyperlinks is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowInsertingHyperlink property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isInsertingRowsAllowed/setInsertingRowsAllowed
public boolean isInsertingRowsAllowed() / public void setInsertingRowsAllowed(boolean value)
Represents if the insertion of rows is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowInsertingRow property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isSortingAllowed/setSortingAllowed
public boolean isSortingAllowed() / public void setSortingAllowed(boolean value)
Represents if the sorting option is allowed on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowSorting property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isUsingPivotTablesAllowed/setUsingPivotTablesAllowed
public boolean isUsingPivotTablesAllowed() / public void setUsingPivotTablesAllowed(boolean value)
Represents if the user is allowed to manipulate pivot tables on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowUsingPivotTable property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isEditingContentsAllowed/setEditingContentsAllowed
public boolean isEditingContentsAllowed() / public void setEditingContentsAllowed(boolean value)
Represents if the user is allowed to edit contents of locked cells on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowEditingContent property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isEditingObjectsAllowed/setEditingObjectsAllowed
public boolean isEditingObjectsAllowed() / public void setEditingObjectsAllowed(boolean value)
Represents if the user is allowed to manipulate drawing objects on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowEditingObject property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isEditingScenariosAllowed/setEditingScenariosAllowed
public boolean isEditingScenariosAllowed() / public void setEditingScenariosAllowed(boolean value)
Represents if the user is allowed to edit scenarios on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowEditingScenario property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
getPassword/setPassword
public java.lang.String getPassword() / public void setPassword(java.lang.String value)
Represents the password to protect the worksheet.
If password is set to null or blank string, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook.
isSelectingLockedCellsAllowed/setSelectingLockedCellsAllowed
public boolean isSelectingLockedCellsAllowed() / public void setSelectingLockedCellsAllowed(boolean value)
Represents if the user is allowed to select locked cells on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowSelectingLockedCell property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
isSelectingUnlockedCellsAllowed/setSelectingUnlockedCellsAllowed
public boolean isSelectingUnlockedCellsAllowed() / public void setSelectingUnlockedCellsAllowed(boolean value)
Represents if the user is allowed to select unlocked cells on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowSelectingUnlockedCell property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowDeletingColumn | |
public voidsetAllowDeletingColumn(booleanvalue)
|
-
Represents if the deletion of columns is allowed on a protected worksheet.
The columns containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled.
setDeletingColumnsAllowed | |
public voidsetDeletingColumnsAllowed(booleanvalue)
|
-
Represents if the deletion of columns is allowed on a protected worksheet.
The columns containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled. NOTE: This member is now obsolete. Instead,
please use Protection.AllowDeletingColumn property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowDeletingRow | |
public voidsetAllowDeletingRow(booleanvalue)
|
-
Represents if the deletion of rows is allowed on a protected worksheet.
The rows containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled.
setDeletingRowsAllowed | |
public voidsetDeletingRowsAllowed(booleanvalue)
|
-
Represents if the deletion of rows is allowed on a protected worksheet.
The rows containing the cells to be deleted must be unlocked when the sheet is protected,
and "Select unlocked cells" option must be enabled. NOTE: This member is now obsolete. Instead,
please use Protection.AllowDeletingRow property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowFiltering | |
public voidsetAllowFiltering(booleanvalue)
|
-
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
setFilteringAllowed | |
public voidsetFilteringAllowed(booleanvalue)
|
-
Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFiltering property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowFormattingCell | |
public voidsetAllowFormattingCell(booleanvalue)
|
-
Represents if the formatting of cells is allowed on a protected worksheet.
setFormattingCellsAllowed | |
public voidsetFormattingCellsAllowed(booleanvalue)
|
-
Represents if the formatting of cells is allowed on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFormattingCell property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowFormattingColumn | |
public voidsetAllowFormattingColumn(booleanvalue)
|
-
Represents if the formatting of columns is allowed on a protected worksheet
setFormattingColumnsAllowed | |
public voidsetFormattingColumnsAllowed(booleanvalue)
|
-
Represents if the formatting of columns is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFormattingColumn property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowFormattingRow | |
public voidsetAllowFormattingRow(booleanvalue)
|
-
Represents if the formatting of rows is allowed on a protected worksheet
setFormattingRowsAllowed | |
public voidsetFormattingRowsAllowed(booleanvalue)
|
-
Represents if the formatting of rows is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowFormattingRow property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowInsertingColumn | |
public voidsetAllowInsertingColumn(booleanvalue)
|
-
Represents if the insertion of columns is allowed on a protected worksheet
setInsertingColumnsAllowed | |
public voidsetInsertingColumnsAllowed(booleanvalue)
|
-
Represents if the insertion of columns is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowInsertingColumn property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowInsertingHyperlink | |
public voidsetAllowInsertingHyperlink(booleanvalue)
|
-
Represents if the insertion of hyperlinks is allowed on a protected worksheet
setInsertingHyperlinksAllowed | |
public voidsetInsertingHyperlinksAllowed(booleanvalue)
|
-
Represents if the insertion of hyperlinks is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowInsertingHyperlink property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowInsertingRow | |
public voidsetAllowInsertingRow(booleanvalue)
|
-
Represents if the insertion of rows is allowed on a protected worksheet
setInsertingRowsAllowed | |
public voidsetInsertingRowsAllowed(booleanvalue)
|
-
Represents if the insertion of rows is allowed on a protected worksheet
NOTE: This member is now obsolete. Instead,
please use Protection.AllowInsertingRow property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowSorting | |
public voidsetAllowSorting(booleanvalue)
|
-
Represents if the sorting option is allowed on a protected worksheet.
setSortingAllowed | |
public voidsetSortingAllowed(booleanvalue)
|
-
Represents if the sorting option is allowed on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowSorting property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowUsingPivotTable | |
public voidsetAllowUsingPivotTable(booleanvalue)
|
-
Represents if the user is allowed to manipulate pivot tables on a protected worksheet.
setUsingPivotTablesAllowed | |
public voidsetUsingPivotTablesAllowed(booleanvalue)
|
-
Represents if the user is allowed to manipulate pivot tables on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowUsingPivotTable property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowEditingContent | |
public voidsetAllowEditingContent(booleanvalue)
|
-
Represents if the user is allowed to edit contents of locked cells on a protected worksheet.
setEditingContentsAllowed | |
public voidsetEditingContentsAllowed(booleanvalue)
|
-
Represents if the user is allowed to edit contents of locked cells on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowEditingContent property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowEditingObject | |
public voidsetAllowEditingObject(booleanvalue)
|
-
Represents if the user is allowed to manipulate drawing objects on a protected worksheet.
setEditingObjectsAllowed | |
public voidsetEditingObjectsAllowed(booleanvalue)
|
-
Represents if the user is allowed to manipulate drawing objects on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowEditingObject property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowEditingScenario | |
public voidsetAllowEditingScenario(booleanvalue)
|
-
Represents if the user is allowed to edit scenarios on a protected worksheet.
setEditingScenariosAllowed | |
public voidsetEditingScenariosAllowed(booleanvalue)
|
-
Represents if the user is allowed to edit scenarios on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowEditingScenario property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setPassword | |
public voidsetPassword(java.lang.Stringvalue)
|
-
Represents the password to protect the worksheet.
If password is set to null or blank string, you can unprotect the worksheet or workbook without using a password. Otherwise, you must specify the password to unprotect the worksheet or workbook.
setAllowSelectingLockedCell | |
public voidsetAllowSelectingLockedCell(booleanvalue)
|
-
Represents if the user is allowed to select locked cells on a protected worksheet.
setSelectingLockedCellsAllowed | |
public voidsetSelectingLockedCellsAllowed(booleanvalue)
|
-
Represents if the user is allowed to select locked cells on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowSelectingLockedCell property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.
setAllowSelectingUnlockedCell | |
public voidsetAllowSelectingUnlockedCell(booleanvalue)
|
-
Represents if the user is allowed to select unlocked cells on a protected worksheet.
setSelectingUnlockedCellsAllowed | |
public voidsetSelectingUnlockedCellsAllowed(booleanvalue)
|
-
Represents if the user is allowed to select unlocked cells on a protected worksheet.
NOTE: This member is now obsolete. Instead,
please use Protection.AllowSelectingUnlockedCell property.
This property will be removed 12 months later since June 2010.
Aspose apologizes for any inconvenience you may have experienced.