## Workbook::Protect(ProtectionType, const U16String\&) method


Protects a workbook.

```cpp
void Aspose::Cells::Workbook::Protect(ProtectionType protectionType, const U16String &password)
```


| Parameter | Type | Description |
| --- | --- | --- |
| protectionType | ProtectionType | [Protection](../../protection/) type. |
| password | const U16String\& | Password to protect the workbook. |

## See Also

* Class [Vector](../../vector/)
* Enum [ProtectionType](../../protectiontype/)
* Class [U16String](../../u16string/)
* Class [Workbook](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
## Workbook::Protect(ProtectionType, const char16_t*) method


Protects a workbook.

```cpp
void Aspose::Cells::Workbook::Protect(ProtectionType protectionType, const char16_t *password)
```


| Parameter | Type | Description |
| --- | --- | --- |
| protectionType | ProtectionType | [Protection](../../protection/) type. |
| password | const char16_t* | Password to protect the workbook. |

## See Also

* Class [Vector](../../vector/)
* Enum [ProtectionType](../../protectiontype/)
* Class [Workbook](../)
* Namespace [Aspose::Cells](../../)
* Library [Aspose.Cells for C++](../../../)
