# Protect Sheet Workbook (preview)

> Protect Sheet Workbook activity that protects a sheet in an Excel workbook, optionally allowing a set of actions while the sheet is protected.

`UiPath.Excel.Activities.ProtectSheet`

## Description

Protects a sheet in an Excel workbook, optionally allowing a set of actions while the sheet is protected. This is the cross-platform equivalent of the [Protect Sheet](https://docs.uipath.com/activities/other/latest/productivity/protect-sheet-x) Windows activity.

:::note
This activity does not support `.xls` files.
:::

## Project compatibility

Windows | Cross-platform

## Properties

### Common

* **DisplayName** - The name displayed for the activity in the Designer panel.

### Input

* **File** - The full path of the resource workbook. To switch to a local path, select the plus icon, and then **Use Local File**. The current field changes to **File (local path)**, where you can provide the full path of the workbook.
* **SheetName** - The name of the sheet from the workbook.

### Options

* **Protection Password** - The password that protects the sheet and that is required to unprotect it. If you don't set a password, the sheet is protected without one. This is different from **Password**, which opens the workbook file.
* **Allowed Permissions** - The actions that remain allowed while the sheet is protected. The default value is `None`. You can combine several values, for example, `AllowSorting Or AllowFiltering`. You can choose from the following permissions. The name in parentheses is the value to use in an expression:
  * **Delete columns** (`AllowDeletingColumns`)
  * **Delete rows** (`AllowDeletingRows`)
  * **Filter** (`AllowFiltering`)
  * **Format cells** (`AllowFormattingCells`)
  * **Format columns** (`AllowFormattingColumns`)
  * **Format rows** (`AllowFormattingRows`)
  * **Insert columns** (`AllowInsertingColumns`)
  * **Insert hyperlinks** (`AllowInsertingHyperlinks`)
  * **Insert rows** (`AllowInsertingRows`)
  * **Sort** (`AllowSorting`)
  * **Use pivot tables** (`AllowUsingPivotTables`)
  * **Edit objects** (`DrawingObjects`)
  * **Edit scenarios** (`Scenarios`)
* **Password** - The password of the workbook file, if necessary. It is not related to the protection of the sheet.

### Use Workbook

* **Workbook** - The existing workbook to use instead of a file path.

## Related activities

* [Unprotect Sheet Workbook](https://docs.uipath.com/activities/other/latest/productivity/unprotect-sheet-workbook) - Removes the protection from a sheet.
