# ExcelSheetProtectionOptionsFluent

The fluent methods of ExcelSheetProtectionOptions, generated from its public properties: A property-named method sets a property and a singular-named method…

Class 

`OfficeIMO.Excel`

**Namespace**

`OfficeIMO.Excel`

**Assembly**

`OfficeIMO.Excel`

**Modifiers**

static

The fluent methods of [ExcelSheetProtectionOptions](/api/excel/officeimo-excel-excelsheetprotectionoptions/), generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

## Inheritance

- object
- ExcelSheetProtectionOptionsFluent

Filter members 

Show inherited

## Methods

`public static ExcelSheetProtectionOptions AllowAutoFilter(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowautofilter-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowAutoFilter](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow AutoFilter.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                           // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowAutoFilter = value };    excelSheetProtectionOptions.AllowAutoFilter(value);
```

`public static ExcelSheetProtectionOptions AllowDeleteColumns(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowdeletecolumns-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowDeleteColumns](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow deleting columns.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                              // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowDeleteColumns = value };    excelSheetProtectionOptions.AllowDeleteColumns(value);
```

`public static ExcelSheetProtectionOptions AllowDeleteRows(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowdeleterows-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowDeleteRows](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow deleting rows.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                           // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowDeleteRows = value };    excelSheetProtectionOptions.AllowDeleteRows(value);
```

`public static ExcelSheetProtectionOptions AllowFormatCells(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowformatcells-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowFormatCells](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow formatting cells.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                            // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowFormatCells = value };    excelSheetProtectionOptions.AllowFormatCells(value);
```

`public static ExcelSheetProtectionOptions AllowFormatColumns(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowformatcolumns-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowFormatColumns](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow formatting columns.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                              // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowFormatColumns = value };    excelSheetProtectionOptions.AllowFormatColumns(value);
```

`public static ExcelSheetProtectionOptions AllowFormatRows(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowformatrows-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowFormatRows](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow formatting rows.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                           // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowFormatRows = value };    excelSheetProtectionOptions.AllowFormatRows(value);
```

`public static ExcelSheetProtectionOptions AllowInsertColumns(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowinsertcolumns-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowInsertColumns](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow inserting columns.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                              // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowInsertColumns = value };    excelSheetProtectionOptions.AllowInsertColumns(value);
```

`public static ExcelSheetProtectionOptions AllowInsertHyperlinks(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowinserthyperlinks-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowInsertHyperlinks](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow inserting hyperlinks.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                                 // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowInsertHyperlinks = value };    excelSheetProtectionOptions.AllowInsertHyperlinks(value);
```

`public static ExcelSheetProtectionOptions AllowInsertRows(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowinsertrows-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowInsertRows](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow inserting rows.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                           // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowInsertRows = value };    excelSheetProtectionOptions.AllowInsertRows(value);
```

`public static ExcelSheetProtectionOptions AllowPivotTables(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowpivottables-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowPivotTables](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow PivotTables.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                            // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowPivotTables = value };    excelSheetProtectionOptions.AllowPivotTables(value);
```

`public static ExcelSheetProtectionOptions AllowSelectLockedCells(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowselectlockedcells-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowSelectLockedCells](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow selecting locked cells.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                                  // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowSelectLockedCells = value };    excelSheetProtectionOptions.AllowSelectLockedCells(value);
```

`public static ExcelSheetProtectionOptions AllowSelectUnlockedCells(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowselectunlockedcells-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowSelectUnlockedCells](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow selecting unlocked cells.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                                    // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowSelectUnlockedCells = value };    excelSheetProtectionOptions.AllowSelectUnlockedCells(value);
```

`public static ExcelSheetProtectionOptions AllowSort(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool value = true)` [#](#method-allowsort-officeimo-excel-excelsheetprotectionoptions-boolean)

Sets [ExcelSheetProtectionOptions.AllowSort](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Allow sorting.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                     // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { AllowSort = value };    excelSheetProtectionOptions.AllowSort(value);
```

`public static ExcelSheetProtectionOptions LegacyPasswordHash(ExcelSheetProtectionOptions excelSheetProtectionOptions, string? value)` [#](#method-legacypasswordhash-officeimo-excel-excelsheetprotectionoptions-string)

Sets [ExcelSheetProtectionOptions.LegacyPasswordHash](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Optional precomputed legacy worksheet protection hash. When set, this value is written as-is.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value string? required**

The value.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                              // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { LegacyPasswordHash = value };    excelSheetProtectionOptions.LegacyPasswordHash(value);
```

`public static ExcelSheetProtectionOptions Password(ExcelSheetProtectionOptions excelSheetProtectionOptions, string? value)` [#](#method-password-officeimo-excel-excelsheetprotectionoptions-string)

Sets [ExcelSheetProtectionOptions.Password](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Optional worksheet protection password. This is Excel UI protection, not package encryption.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value string? required**

The value.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                    // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { Password = value };    excelSheetProtectionOptions.Password(value);
```

`public static ExcelSheetProtectionOptions ProtectObjects(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool? value = true)` [#](#method-protectobjects-officeimo-excel-excelsheetprotectionoptions-nullable-system-boolean)

Sets [ExcelSheetProtectionOptions.ProtectObjects](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Protect worksheet drawing objects when set. When null, the objects attribute is omitted.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool? = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                          // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { ProtectObjects = value };    excelSheetProtectionOptions.ProtectObjects(value);
```

`public static ExcelSheetProtectionOptions ProtectScenarios(ExcelSheetProtectionOptions excelSheetProtectionOptions, bool? value = true)` [#](#method-protectscenarios-officeimo-excel-excelsheetprotectionoptions-nullable-system-boolean)

Sets [ExcelSheetProtectionOptions.ProtectScenarios](/api/excel/officeimo-excel-excelsheetprotectionoptions/): Protect worksheet scenarios when set. When null, the scenarios attribute is omitted.

Parameters

**excelSheetProtectionOptions OfficeIMO.Excel.ExcelSheetProtectionOptions required**

The instance.

**value bool? = true optional**

The value; true when omitted.

Returns

`ExcelSheetProtectionOptions` The same instance.

Examples

```csharp
// C# initializer or property                                                            // C# fluent
new global::OfficeIMO.Excel.ExcelSheetProtectionOptions { ProtectScenarios = value };    excelSheetProtectionOptions.ProtectScenarios(value);
```

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:770036C1A65BE58B4D11B3AFAC3CC0C0825C8DE5C4DF1B68041BE7328268CA0E -->
