Aspose::Cells::Protection class
Contents
[
Hide
]Protection class
Represents the various types of protection options available for a worksheet.
class Protection
Methods
Method | Description |
---|---|
Copy(const Protection& source) | Copy protection info. |
GetAllowDeletingColumn() | Represents if the deletion of columns is allowed on a protected worksheet. |
GetAllowDeletingRow() | Represents if the deletion of rows is allowed on a protected worksheet. |
GetAllowEditingContent() | Represents if the user is allowed to edit contents of locked cells on a protected worksheet. |
GetAllowEditingObject() | Represents if the user is allowed to manipulate drawing objects on a protected worksheet. |
GetAllowEditingScenario() | Represents if the user is allowed to edit scenarios on a protected worksheet. |
GetAllowFiltering() | Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. |
GetAllowFormattingCell() | Represents if the formatting of cells is allowed on a protected worksheet. |
GetAllowFormattingColumn() | Represents if the formatting of columns is allowed on a protected worksheet. |
GetAllowFormattingRow() | Represents if the formatting of rows is allowed on a protected worksheet. |
GetAllowInsertingColumn() | Represents if the insertion of columns is allowed on a protected worksheet. |
GetAllowInsertingHyperlink() | Represents if the insertion of hyperlinks is allowed on a protected worksheet. |
GetAllowInsertingRow() | Represents if the insertion of rows is allowed on a protected worksheet. |
GetAllowSelectingLockedCell() | Represents if the user is allowed to select locked cells on a protected worksheet. |
GetAllowSelectingUnlockedCell() | Represents if the user is allowed to select unlocked cells on a protected worksheet. |
GetAllowSorting() | Represents if the sorting option is allowed on a protected worksheet. |
GetAllowUsingPivotTable() | Represents if the user is allowed to manipulate pivot tables on a protected worksheet. |
GetPassword() | Represents the password to protect the worksheet. |
GetPasswordHash() | Gets the hash of current password. |
IsNull() const | Checks whether the implementation object is nullptr. |
IsProtectedWithPassword() | Indicates whether the worksheets is protected with password. |
explicit operator bool() const | operator bool() |
operator=(const Protection& src) | operator= |
Protection(Protection_Impl* impl) | Constructs from an implementation object. |
Protection(const Protection& src) | Copy constructor. |
SetAllowDeletingColumn(bool value) | Represents if the deletion of columns is allowed on a protected worksheet. |
SetAllowDeletingRow(bool value) | Represents if the deletion of rows is allowed on a protected worksheet. |
SetAllowEditingContent(bool value) | Represents if the user is allowed to edit contents of locked cells on a protected worksheet. |
SetAllowEditingObject(bool value) | Represents if the user is allowed to manipulate drawing objects on a protected worksheet. |
SetAllowEditingScenario(bool value) | Represents if the user is allowed to edit scenarios on a protected worksheet. |
SetAllowFiltering(bool value) | Represents if the user is allowed to make use of an AutoFilter that was created before the sheet was protected. |
SetAllowFormattingCell(bool value) | Represents if the formatting of cells is allowed on a protected worksheet. |
SetAllowFormattingColumn(bool value) | Represents if the formatting of columns is allowed on a protected worksheet. |
SetAllowFormattingRow(bool value) | Represents if the formatting of rows is allowed on a protected worksheet. |
SetAllowInsertingColumn(bool value) | Represents if the insertion of columns is allowed on a protected worksheet. |
SetAllowInsertingHyperlink(bool value) | Represents if the insertion of hyperlinks is allowed on a protected worksheet. |
SetAllowInsertingRow(bool value) | Represents if the insertion of rows is allowed on a protected worksheet. |
SetAllowSelectingLockedCell(bool value) | Represents if the user is allowed to select locked cells on a protected worksheet. |
SetAllowSelectingUnlockedCell(bool value) | Represents if the user is allowed to select unlocked cells on a protected worksheet. |
SetAllowSorting(bool value) | Represents if the sorting option is allowed on a protected worksheet. |
SetAllowUsingPivotTable(bool value) | Represents if the user is allowed to manipulate pivot tables on a protected worksheet. |
SetPassword(const U16String& value) | Represents the password to protect the worksheet. |
SetPassword(const char16_t* value) | Represents the password to protect the worksheet. |
VerifyPassword(const U16String& password) | Verifies password. |
VerifyPassword(const char16_t* password) | Verifies password. |
~Protection() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
Examples
Aspose::Cells::Startup();
//Instantiating a Workbook object
Workbook workbook;
Worksheet worksheet = workbook.GetWorksheets().Get(0);
//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);
Aspose::Cells::Cleanup();
See Also
- Namespace Aspose::Cells
- Library Aspose.Cells for C++