SheetProtection Class

Represents sheet-level protection settings matching the XLSX sheetProtection element. When IsProtected is true, actions are blocked unless the corresponding Allow property is true.

Inheritance

Object

Documents.Spreadsheet.SheetProtection

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class SheetProtection

Constructors

SheetProtectionlink

Represents sheet-level protection settings matching the XLSX sheetProtection element. When IsProtected is true, actions are blocked unless the corresponding Allow property is true.

Declaration
public SheetProtection()

Properties

AlgorithmNamelink

Gets or sets the hash algorithm name (e.g. "SHA-512").

Declaration
public string AlgorithmName { get; set; }
Property Value
Type Description
stringGets or sets the hash algorithm name (e.g. "SHA-512").

AllowAutoFilterlink

Gets or sets whether auto-filter is allowed when the sheet is protected.

Declaration
public bool AllowAutoFilter { get; set; }
Property Value
Type Description
boolGets or sets whether auto-filter is allowed when the sheet is protected.

AllowDeleteColumnslink

Gets or sets whether deleting columns is allowed when the sheet is protected.

Declaration
public bool AllowDeleteColumns { get; set; }
Property Value
Type Description
boolGets or sets whether deleting columns is allowed when the sheet is protected.

AllowDeleteRowslink

Gets or sets whether deleting rows is allowed when the sheet is protected.

Declaration
public bool AllowDeleteRows { get; set; }
Property Value
Type Description
boolGets or sets whether deleting rows is allowed when the sheet is protected.

AllowFormatCellslink

Gets or sets whether formatting cells is allowed when the sheet is protected.

Declaration
public bool AllowFormatCells { get; set; }
Property Value
Type Description
boolGets or sets whether formatting cells is allowed when the sheet is protected.

AllowFormatColumnslink

Gets or sets whether formatting columns is allowed when the sheet is protected.

Declaration
public bool AllowFormatColumns { get; set; }
Property Value
Type Description
boolGets or sets whether formatting columns is allowed when the sheet is protected.

AllowFormatRowslink

Gets or sets whether formatting rows is allowed when the sheet is protected.

Declaration
public bool AllowFormatRows { get; set; }
Property Value
Type Description
boolGets or sets whether formatting rows is allowed when the sheet is protected.

AllowInsertColumnslink

Gets or sets whether inserting columns is allowed when the sheet is protected.

Declaration
public bool AllowInsertColumns { get; set; }
Property Value
Type Description
boolGets or sets whether inserting columns is allowed when the sheet is protected.

AllowInsertRowslink

Gets or sets whether inserting rows is allowed when the sheet is protected.

Declaration
public bool AllowInsertRows { get; set; }
Property Value
Type Description
boolGets or sets whether inserting rows is allowed when the sheet is protected.

AllowSelectLockedCellslink

Gets or sets whether selecting locked cells is allowed when the sheet is protected.

Declaration
public bool AllowSelectLockedCells { get; set; }
Property Value
Type Description
boolGets or sets whether selecting locked cells is allowed when the sheet is protected.

AllowSelectUnlockedCellslink

Gets or sets whether selecting unlocked cells is allowed when the sheet is protected.

Declaration
public bool AllowSelectUnlockedCells { get; set; }
Property Value
Type Description
boolGets or sets whether selecting unlocked cells is allowed when the sheet is protected.

AllowSortlink

Gets or sets whether sorting is allowed when the sheet is protected.

Declaration
public bool AllowSort { get; set; }
Property Value
Type Description
boolGets or sets whether sorting is allowed when the sheet is protected.

HashValuelink

Gets or sets the base64-encoded password hash value.

Declaration
public string HashValue { get; set; }
Property Value
Type Description
stringGets or sets the base64-encoded password hash value.

IsProtectedlink

Gets or sets whether sheet protection is active.

Declaration
public bool IsProtected { get; set; }
Property Value
Type Description
boolGets or sets whether sheet protection is active.

PasswordHashlink

Gets or sets the legacy 16-bit password hash (4 hex characters).

Declaration
public string PasswordHash { get; set; }
Property Value
Type Description
stringGets or sets the legacy 16-bit password hash (4 hex characters).

SaltValuelink

Gets or sets the base64-encoded salt value.

Declaration
public string SaltValue { get; set; }
Property Value
Type Description
stringGets or sets the base64-encoded salt value.

SpinCountlink

Gets or sets the number of hash iterations.

Declaration
public int? SpinCount { get; set; }
Property Value
Type Description
int?Gets or sets the number of hash iterations.

Methods

IsActionBlockedlink

Returns true if the given action is blocked by protection.

Declaration
public bool IsActionBlocked(Documents.Spreadsheet.SheetAction action)
Parameters
Type Name Description
Documents.Spreadsheet.SheetAction action
Returns
Type Description
bool
An error has occurred. This app may no longer respond until reloaded. Reload 🗙