Represents a range of cells in a worksheet that may be edited by the end user.

Inheritance

constructor

public WorksheetProtectedRange(string title)

Returns WorksheetProtectedRange

constructor

public WorksheetProtectedRange(string name, SecureString password)

Returns WorksheetProtectedRange

constructor

public WorksheetProtectedRange(string name, string password)

Returns WorksheetProtectedRange

Returns true if the range has a password associated with it.

public bool HasPassword { get; }

Returns a boolean indicating if the range is currently locked.

public bool IsProtected { get; }

Returns a collection of ranges that may be edited when the worksheet is protected.

public ICollection<WorksheetRegion> Ranges { get; }

Returns or sets the security descriptor used to define permissions for accounts that may edit the associated range without a password.

public string SecurityDescriptor { get; set; }

Returns or sets the name of the range.

public string Title { get; set; }

Returns the worksheet with which the edit range is associated.

public Worksheet Worksheet { get; }

Sets the password required to unlock the associated range of cells.

public void SetPassword(SecureString password)

Parameters

  • password: SecureString

Returns any

Sets the password required to unlock the associated range of cells.

public void SetPassword(string password)

Parameters

  • password: string

Returns any

SetSecurityDescriptor(params WorksheetProtectedRangeUserPermission[])

Section titled "SetSecurityDescriptor(params WorksheetProtectedRangeUserPermission[])"

Sets the property from the specified user accounts

public void SetSecurityDescriptor(params WorksheetProtectedRangeUserPermission[] permissions)

Parameters

  • permissions: WorksheetProtectedRangeUserPermission[]

Returns any

Removes the password from the range.

public void Unprotect()

Returns any

Attempts to use the specified password to unlock the range.

public void Unprotect(SecureString password)

Parameters

  • password: SecureString

Returns any

Attempts to use the specified password to unlock the range.

public void Unprotect(string password)

Parameters

  • password: string

Returns any