Show / Hide Table of Contents

Class SheetProtection

Represents the protection of a sheet

Inheritance
System.Object
SheetProtection
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class SheetProtection : object

Constructors

SheetProtection()

Declaration
public SheetProtection()

Properties

DeleteColumns

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

Declaration
public bool DeleteColumns { get; set; }
Property Value
Type Description
System.Boolean

DeleteRows

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

Declaration
public bool DeleteRows { get; set; }
Property Value
Type Description
System.Boolean

EditObjects

Gets or sets whether editing of objects is allowed when the sheet is protected

Declaration
public bool EditObjects { get; set; }
Property Value
Type Description
System.Boolean

EditScenarios

Gets or sets whether the editing of scenarios is allowed when the sheet is protected.

Declaration
public bool EditScenarios { get; set; }
Property Value
Type Description
System.Boolean

FormatCells

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

Declaration
public bool FormatCells { get; set; }
Property Value
Type Description
System.Boolean

FormatColumns

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

Declaration
public bool FormatColumns { get; set; }
Property Value
Type Description
System.Boolean

FormatRows

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

Declaration
public bool FormatRows { get; set; }
Property Value
Type Description
System.Boolean

InsertColumns

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

Declaration
public bool InsertColumns { get; set; }
Property Value
Type Description
System.Boolean

InsertHyperlinks

Gets or sets whether inserting hyperlinks is allowed when the sheet is protected

Declaration
public bool InsertHyperlinks { get; set; }
Property Value
Type Description
System.Boolean

InsertRows

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

Declaration
public bool InsertRows { get; set; }
Property Value
Type Description
System.Boolean

PasswordHash

Get or set the hash of the password of the sheet protection

Declaration
public ushort PasswordHash { get; set; }
Property Value
Type Description
System.UInt16

Protected

Gets or sets whether to protect worksheet and contents of locked cells.

Declaration
public bool Protected { get; set; }
Property Value
Type Description
System.Boolean

SelectLockedCells

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

Declaration
public bool SelectLockedCells { get; set; }
Property Value
Type Description
System.Boolean

SelectUnlockedCells

Gets or sets whether selection of unlocked cells is allowed when the sheet is protected

Declaration
public bool SelectUnlockedCells { get; set; }
Property Value
Type Description
System.Boolean

Sort

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

Declaration
public bool Sort { get; set; }
Property Value
Type Description
System.Boolean

UseAutoFilter

Gets or sets whether the use of AutoFilters is allowed when the sheet is protected.

Declaration
public bool UseAutoFilter { get; set; }
Property Value
Type Description
System.Boolean

UsePivotTables

Gets or sets whether the use of PivotTables and Pivot Charts are allowed when the sheet is protected.

Declaration
public bool UsePivotTables { get; set; }
Property Value
Type Description
System.Boolean

Methods

Protect()

Declaration
public void Protect()

SetPasswordHash(String)

Set the password hash from a given password.

Declaration
public void SetPasswordHash(string password)
Parameters
Type Name Description
System.String password

The password to hash

Back to top Generated by DocFX