---
Product: Aspose.Cells
Platform: cpp
Page Type: reference
Canonical URL: https://reference.aspose.org/cells/cpp/workbookprotection
---

# WorkbookProtection

## Overview

`WorkbookProtection` is a class in Aspose.Cells FOSS for C++.

Represents workbook protection.

This class declares 11 methods for WorkbookProtection objects in C++ programs.
Available methods include: `GetLockRevision`, `GetLockStructure`, `GetLockWindows`, `GetRevisionsPassword`, `GetWorkbookPassword`, `IsProtected`, `SetLockRevision`, `SetLockStructure`, `SetLockWindows`, `SetRevisionsPassword`, `SetWorkbookPassword`.
Public members are accessible to any C++ application after installing the Aspose.Cells FOSS for C++ package.

## Methods

| Signature | Description |
|-----------|-------------|
| `IsProtected()` → `bool` | Gets a value indicating whether protected. |
| `GetLockStructure()` → `bool` | Gets or sets a value indicating whether lock structure. |
| `SetLockStructure(value: bool)` | Sets the lock structure value. |
| `GetLockWindows()` → `bool` | Gets or sets a value indicating whether lock windows. |
| `SetLockWindows(value: bool)` | Sets the lock windows value. |
| `GetLockRevision()` → `bool` | Gets or sets a value indicating whether lock revision. |
| `SetLockRevision(value: bool)` | Sets the lock revision value. |
| `GetWorkbookPassword()` → `std::string` | Gets or sets the workbook password. |
| `SetWorkbookPassword(value: std::string_view)` | Sets the workbook password value. |
| `GetRevisionsPassword()` → `std::string` | Gets or sets the revisions password. |
| `SetRevisionsPassword(value: std::string_view)` | Sets the revisions password value. |

## See Also

- [Aspose.Cells — Enterprise API Reference](https://reference.aspose.com/cells/)