# ProtectionOptions Interface

> ProtectionOptions interface in the TX Sheet Control TypeScript API for the browser: Fine-grained protected-sheet permissions.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Interface
- **Path:** TX Sheet Control > API Reference > TypeScript API > Browser Editor > ProtectionOptions Interface
- **1164 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/llms-full.txt

---

Fine-grained protected-sheet permissions; passwords are not stored as clear text.

Package: `@txtextcontrol/tx-sheet-control`. Version: **2.0.0**.

Type-only declaration; it is not a JavaScript runtime constructor.

### Members

#### Properties

| Property | Description |
|---|---|
| [allowDeleteColumns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowdeletecolumns-property/llms-full.txt) | The allowDeleteColumns value of ProtectionOptions. |
| [allowDeleteRows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowdeleterows-property/llms-full.txt) | The allowDeleteRows value of ProtectionOptions. |
| [allowEditObjects](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/alloweditobjects-property/llms-full.txt) | The allowEditObjects value of ProtectionOptions. |
| [allowEditScenarios](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/alloweditscenarios-property/llms-full.txt) | Preserved for native Excel scenario editing. |
| [allowFilter](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowfilter-property/llms-full.txt) | The allowFilter value of ProtectionOptions. |
| [allowFormatCells](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowformatcells-property/llms-full.txt) | The allowFormatCells value of ProtectionOptions. |
| [allowFormatColumns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowformatcolumns-property/llms-full.txt) | The allowFormatColumns value of ProtectionOptions. |
| [allowFormatRows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowformatrows-property/llms-full.txt) | The allowFormatRows value of ProtectionOptions. |
| [allowInsertColumns](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowinsertcolumns-property/llms-full.txt) | The allowInsertColumns value of ProtectionOptions. |
| [allowInsertHyperlinks](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowinserthyperlinks-property/llms-full.txt) | The allowInsertHyperlinks value of ProtectionOptions. |
| [allowInsertRows](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowinsertrows-property/llms-full.txt) | The allowInsertRows value of ProtectionOptions. |
| [allowSelectLockedCells](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowselectlockedcells-property/llms-full.txt) | The allowSelectLockedCells value of ProtectionOptions. |
| [allowSelectUnlockedCells](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowselectunlockedcells-property/llms-full.txt) | The allowSelectUnlockedCells value of ProtectionOptions. |
| [allowSort](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowsort-property/llms-full.txt) | The allowSort value of ProtectionOptions. |
| [allowUsePivotTables](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowusepivottables-property/llms-full.txt) | Preserved for native Excel PivotTable operations. |
| [password](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/password-property/llms-full.txt) | The password value of ProtectionOptions. |

### Examples

Use a fresh workbook. Create and format the sample data, apply this API and retain the returned document or result in your application. In the browser pass editor.workbook; in Node.js pass the server control.

```typescript
import type { Workbook } from '@txtextcontrol/tx-sheet-control';
import type { ProtectionOptions } from '@txtextcontrol/tx-sheet-control';

function createProtectionOptionsReport(book: Workbook) {
    const sheet = book.sheets.at(0);
    sheet.cell('A1').setText('October invoice');
    sheet
        .cell('A1')
        .format({
            fontFamily: 'Liberation Sans',
            fontSize: 16,
            bold: true,
            textColor: '#ffffff',
            fillColor: '#163b63',
        });

    sheet.columns.at(0).setWidth({ pixels: 240 });
    sheet.range('B8:B9').setValues([[120], [80]]);
    sheet.cell('B10').setFormula('=SUM(B8:B9)');
    sheet.range('B8:B10').format({ numberFormatCode: '#,##0.00', fontSize: 11 });

    const protectionSettings: ProtectionOptions = { password: 'sample-edit-password' };
    sheet.protection.protect(protectionSettings);
    return sheet;
}
```

### See Also

- [TypeScript Browser Editor API](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/llms-full.txt)
- [Worksheet Protection](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/protection/llms-full.txt)

---

## In This Section

- [ProtectionOptions.allowDeleteColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowdeletecolumns-property/llms-full.txt): ProtectionOptions.allowDeleteColumns property in the browser TypeScript API, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowDeleteRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowdeleterows-property/llms-full.txt): ProtectionOptions.allowDeleteRows property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowEditObjects Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/alloweditobjects-property/llms-full.txt): ProtectionOptions.allowEditObjects property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowEditScenarios Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/alloweditscenarios-property/llms-full.txt): ProtectionOptions.allowEditScenarios property in the TX Sheet Control TypeScript API for the browser: Preserved for native Excel scenario editing.
- [ProtectionOptions.allowFilter Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowfilter-property/llms-full.txt): ProtectionOptions.allowFilter property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowFormatCells Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowformatcells-property/llms-full.txt): ProtectionOptions.allowFormatCells property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowFormatColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowformatcolumns-property/llms-full.txt): ProtectionOptions.allowFormatColumns property in the browser TypeScript API, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowFormatRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowformatrows-property/llms-full.txt): ProtectionOptions.allowFormatRows property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowInsertColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowinsertcolumns-property/llms-full.txt): ProtectionOptions.allowInsertColumns property in the browser TypeScript API, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowInsertHyperlinks Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowinserthyperlinks-property/llms-full.txt): ProtectionOptions.allowInsertHyperlinks property in the browser TypeScript API, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowInsertRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowinsertrows-property/llms-full.txt): ProtectionOptions.allowInsertRows property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowSelectLockedCells Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowselectlockedcells-property/llms-full.txt): ProtectionOptions.allowSelectLockedCells property in the browser TypeScript API, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowSelectUnlockedCells Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowselectunlockedcells-property/llms-full.txt): ProtectionOptions.allowSelectUnlockedCells property in the browser TypeScript API, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowSort Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowsort-property/llms-full.txt): ProtectionOptions.allowSort property in the TX Sheet Control TypeScript API for the browser, with its type boolean | undefined and a TypeScript example.
- [ProtectionOptions.allowUsePivotTables Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowusepivottables-property/llms-full.txt): ProtectionOptions.allowUsePivotTables property in the TX Sheet Control TypeScript API for the browser: Preserved for native Excel PivotTable operations.
- [ProtectionOptions.password Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/password-property/llms-full.txt): ProtectionOptions.password property in the TX Sheet Control TypeScript API for the browser, with its type string | undefined and a TypeScript example.

---

## Nearby

- **Previous:** [PrintSettings.scale Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/printsettings/scale-property/llms-full.txt)
- **Next:** [ProtectionOptions.allowDeleteColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/typescript-api/browser/protectionoptions/allowdeletecolumns-property/llms-full.txt)
