Represents a range of cells in a worksheet that may be edited by the end user.
Inheritance
object
Constructors
Section titled "Constructors"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
Properties
Section titled "Properties"HasPassword
Section titled "HasPassword"Returns true if the range has a password associated with it.
public bool HasPassword { get; } IsProtected
Section titled "IsProtected"Returns a boolean indicating if the range is currently locked.
public bool IsProtected { get; } Ranges
Section titled "Ranges"Returns a collection of ranges that may be edited when the worksheet is protected.
public ICollection<WorksheetRegion> Ranges { get; } SecurityDescriptor
Section titled "SecurityDescriptor"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; } Title
Section titled "Title"Returns or sets the name of the range.
public string Title { get; set; } Worksheet
Section titled "Worksheet"Returns the worksheet with which the edit range is associated.
public Worksheet Worksheet { get; } Methods
Section titled "Methods"SetPassword(SecureString)
Section titled "SetPassword(SecureString)"Sets the password required to unlock the associated range of cells.
public void SetPassword(SecureString password) Parameters
- password:
SecureString
Returns any
SetPassword(string)
Section titled "SetPassword(string)"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
Unprotect()
Section titled "Unprotect()"Removes the password from the range.
public void Unprotect() Returns any
Unprotect(SecureString)
Section titled "Unprotect(SecureString)"Attempts to use the specified password to unlock the range.
public void Unprotect(SecureString password) Parameters
- password:
SecureString
Returns any
Unprotect(string)
Section titled "Unprotect(string)"Attempts to use the specified password to unlock the range.
public void Unprotect(string password) Parameters
- password:
string