Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

ExcelSheetProtectionOptions

OfficeIMO.Excel

Namespace
OfficeIMO.Excel
Assembly
OfficeIMO.Excel
Source revision
0eef6a5756b9 with working tree changes
Modifiers
sealed

Options controlling worksheet protection behavior.

Inheritance

  • object
  • ExcelSheetProtectionOptions

Usage

Explore 2 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Accepted by parameters 1

Constructors

public ExcelSheetProtectionOptions() #

Methods

public static ExcelSheetProtectionOptions TableEditing(string? password = null) #

Creates protection options that keep the sheet protected while allowing common table editing workflows.

Parameters

password string? = null optional

Properties

public bool AllowSelectLockedCells { get; set; } #

Allow selecting locked cells.

public bool AllowSelectUnlockedCells { get; set; } #

Allow selecting unlocked cells.

public bool AllowFormatCells { get; set; } #

Allow formatting cells.

public bool AllowFormatColumns { get; set; } #

Allow formatting columns.

public bool AllowFormatRows { get; set; } #

Allow formatting rows.

public bool AllowInsertColumns { get; set; } #

Allow inserting columns.

public bool AllowInsertRows { get; set; } #

Allow inserting rows.

public bool AllowDeleteColumns { get; set; } #

Allow deleting columns.

public bool AllowDeleteRows { get; set; } #

Allow deleting rows.

public bool AllowSort { get; set; } #

Allow sorting.

public bool AllowAutoFilter { get; set; } #

Allow AutoFilter.

public bool AllowPivotTables { get; set; } #

Allow PivotTables.

public bool? ProtectObjects { get; set; } #

Protect worksheet drawing objects when set. When null, the objects attribute is omitted.

public bool? ProtectScenarios { get; set; } #

Protect worksheet scenarios when set. When null, the scenarios attribute is omitted.

public string? Password { get; set; } #

Optional worksheet protection password. This is Excel UI protection, not package encryption.

public string? LegacyPasswordHash { get; set; } #

Optional precomputed legacy worksheet protection hash. When set, this value is written as-is.