GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ProtectedRange Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a range of cells to be protected.

    • C#
    • VB.NET
    public sealed class ProtectedRange
    Public NotInheritable Class ProtectedRange
    Inheritance:
    System.Object
    ProtectedRange
    Remarks

    Ranges listed here are protected only when the sheet protection is ON and the cell is flagged as being locked.If no password is specified here, then read/write permissions are automatically given to all users, regardless of additional security descriptor information. In other words, the security descriptor information (specific types of access) at the user level is only applied if a password for this range is specified.

    When a password is specified, then users not listed specifically as having access should be prompted with a password.If that user supplies the correct password, then they can edit the range or cell in question.This protection is optional and can be ignored by applications that choose not to support this functionality.

    Properties

    RefersToCells

    Gets or sets the range to be protected.

    • C#
    • VB.NET
    public string RefersToCells { get; set; }
    Public Property RefersToCells As String
    Property Value
    System.String

    The range to be protected.

    Title

    Gets or sets the ProtectedRange title.

    • C#
    • VB.NET
    public string Title { get; set; }
    Public Property Title As String
    Property Value
    System.String

    The ProtectedRange title.

    Methods

    SetPassword(String)

    Sets the ProtectedRange password.

    • C#
    • VB.NET
    public void SetPassword(string password)
    Public Sub SetPassword(password As String)
    Parameters
    password
    System.String

    The ProtectedRange password.

    ToString()

    Returns a System.String that represents this ProtectedRange instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this ProtectedRange instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.