# SheetProtectionSettings Class

> SheetProtectionSettings class in the TX Sheet Control .NET API: Detached worksheet protection settings; this is an editing guard rather than file encryption.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Implements:** `System.IEquatable<TXTextControl.TXSheetControl.Server.SheetProtectionSettings>`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > SheetProtectionSettings Class
- **1651 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/llms-full.txt

---

Detached worksheet protection settings; this is an editing guard rather than file encryption.

### Syntax

```csharp
public class SheetProtectionSettings
```

Interfaces: `IEquatable<SheetProtectionSettings>`.

### Members

#### Constructors

| Constructor | Description |
|---|---|
| [Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/constructor/llms-full.txt) |  |

#### Properties

| Property | Description |
|---|---|
| [AlgorithmName](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/algorithmname-property/llms-full.txt) |  |
| [AllowDeleteColumns](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowdeletecolumns-property/llms-full.txt) |  |
| [AllowDeleteRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowdeleterows-property/llms-full.txt) |  |
| [AllowEditObjects](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/alloweditobjects-property/llms-full.txt) |  |
| [AllowEditScenarios](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/alloweditscenarios-property/llms-full.txt) | Permission retained for native Excel scenario editing. |
| [AllowFilter](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowfilter-property/llms-full.txt) |  |
| [AllowFormatCells](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowformatcells-property/llms-full.txt) |  |
| [AllowFormatColumns](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowformatcolumns-property/llms-full.txt) |  |
| [AllowFormatRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowformatrows-property/llms-full.txt) |  |
| [AllowInsertColumns](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowinsertcolumns-property/llms-full.txt) |  |
| [AllowInsertHyperlinks](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowinserthyperlinks-property/llms-full.txt) |  |
| [AllowInsertRows](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowinsertrows-property/llms-full.txt) |  |
| [AllowSelectLockedCells](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowselectlockedcells-property/llms-full.txt) |  |
| [AllowSelectUnlockedCells](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowselectunlockedcells-property/llms-full.txt) |  |
| [AllowSort](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowsort-property/llms-full.txt) |  |
| [AllowUsePivotTables](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowusepivottables-property/llms-full.txt) | Permission retained for native Excel PivotTable operations. |
| [HashValue](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/hashvalue-property/llms-full.txt) |  |
| [IsProtected](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/isprotected-property/llms-full.txt) |  |
| [PasswordHash](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/passwordhash-property/llms-full.txt) |  |
| [SaltValue](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/saltvalue-property/llms-full.txt) |  |
| [SpinCount](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/spincount-property/llms-full.txt) |  |

### Examples

Obtain SheetProtectionSettings from a real document operation. Return the detached result to the calling report, API response or application.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<SheetProtectionSettings> ReadReportSheetProtectionSettingsAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    await sheet.Cell("B8").SetValueAsync(120);
    await sheet.Cell("B9").SetValueAsync(80);
    await sheet.Cell("B10").SetFormulaAsync("=SUM(B8:B9)");
    await sheet.Cell("A1").SetTextAsync("October invoice");
    await sheet.Cell("A1").FormatAsync(new { fontFamily = "Liberation Sans", fontSize = 16, bold = true, textColor = "#ffffff", fillColor = "#163b63" });
    await sheet.Range("B8:B10").FormatAsync(new { numberFormatCode = "#,##0.00", fontFamily = "Liberation Sans", fontSize = 11 });
    await sheet.Protection.ProtectAsync(new ProtectionOptions { Password = "sample-edit-password" });

    var result = await sheet.Protection.GetSettingsAsync();
    return result;
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Worksheet Protection](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/protection/llms-full.txt)

---

## In This Section

- [SheetProtectionSettings.AlgorithmName Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/algorithmname-property/llms-full.txt): SheetProtectionSettings.AlgorithmName property in the TX Sheet Control .NET API, with its type string? and a C# example.
- [SheetProtectionSettings.AllowDeleteColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowdeletecolumns-property/llms-full.txt): SheetProtectionSettings.AllowDeleteColumns property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowDeleteRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowdeleterows-property/llms-full.txt): SheetProtectionSettings.AllowDeleteRows property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowEditObjects Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/alloweditobjects-property/llms-full.txt): SheetProtectionSettings.AllowEditObjects property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowEditScenarios Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/alloweditscenarios-property/llms-full.txt): SheetProtectionSettings.AllowEditScenarios property in the TX Sheet Control .NET API: Permission retained for native Excel scenario editing.
- [SheetProtectionSettings.AllowFilter Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowfilter-property/llms-full.txt): SheetProtectionSettings.AllowFilter property in the TX Sheet Control .NET API, with its syntax, its type bool? and a C# example.
- [SheetProtectionSettings.AllowFormatCells Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowformatcells-property/llms-full.txt): SheetProtectionSettings.AllowFormatCells property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowFormatColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowformatcolumns-property/llms-full.txt): SheetProtectionSettings.AllowFormatColumns property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowFormatRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowformatrows-property/llms-full.txt): SheetProtectionSettings.AllowFormatRows property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowInsertColumns Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowinsertcolumns-property/llms-full.txt): SheetProtectionSettings.AllowInsertColumns property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowInsertHyperlinks Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowinserthyperlinks-property/llms-full.txt): SheetProtectionSettings.AllowInsertHyperlinks property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowInsertRows Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowinsertrows-property/llms-full.txt): SheetProtectionSettings.AllowInsertRows property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowSelectLockedCells Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowselectlockedcells-property/llms-full.txt): SheetProtectionSettings.AllowSelectLockedCells property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowSelectUnlockedCells Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowselectunlockedcells-property/llms-full.txt): SheetProtectionSettings.AllowSelectUnlockedCells property in the TX Sheet Control .NET API, with its type bool? and a C# example.
- [SheetProtectionSettings.AllowSort Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowsort-property/llms-full.txt): SheetProtectionSettings.AllowSort property in the TX Sheet Control .NET API, with its syntax, its type bool? and a C# example.
- [SheetProtectionSettings.AllowUsePivotTables Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/allowusepivottables-property/llms-full.txt): SheetProtectionSettings.AllowUsePivotTables property in the TX Sheet Control .NET API: Permission retained for native Excel PivotTable operations.
- [SheetProtectionSettings Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/constructor/llms-full.txt): SheetProtectionSettings constructor in the TX Sheet Control .NET API, with its syntax, a C# example and remarks on awaiting tasks and handles.
- [SheetProtectionSettings.HashValue Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/hashvalue-property/llms-full.txt): SheetProtectionSettings.HashValue property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [SheetProtectionSettings.IsProtected Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/isprotected-property/llms-full.txt): SheetProtectionSettings.IsProtected property in the TX Sheet Control .NET API, with its syntax, its type bool and a C# example.
- [SheetProtectionSettings.PasswordHash Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/passwordhash-property/llms-full.txt): SheetProtectionSettings.PasswordHash property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [SheetProtectionSettings.SaltValue Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/saltvalue-property/llms-full.txt): SheetProtectionSettings.SaltValue property in the TX Sheet Control .NET API, with its syntax, its type string? and a C# example.
- [SheetProtectionSettings.SpinCount Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/spincount-property/llms-full.txt): SheetProtectionSettings.SpinCount property in the TX Sheet Control .NET API, with its syntax, its type int? and a C# example.

---

## Nearby

- **Previous:** [SheetPrint.GetSettingsAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprint/getsettingsasync-method/llms-full.txt)
- **Next:** [SheetProtectionSettings Constructor](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/sheetprotectionsettings/constructor/llms-full.txt)
