Search Results for

    Show / Hide Table of Contents

    TProtectedRange Record

    Specifies a protected range in a sheet. You can define those ranges in Excel 2007 by going to "Review" tab and selecting "Allow Users to Edit Ranges" In Excel 2003, they are available under "Menu->Tools->Protection".

    Syntax

    Unit: FlexCel.Core

    TProtectedRange = record;

    Methods

    Name Description
    Create Overloaded
    Create
    Create(string, string, TXlsCellRangeArray)
    Clone Returns a deep copy of the object.
    Equals Returns true if the 2 objects have the same contents.
    GetHashCode Return the hashcode of the object

    Operators

    Name Description
    Equality Adapts the = operator so it returns true when both instances have the same values.
    Inequality Adapts the <> operator so it returns true when both instances have different values.

    Properties

    Name Description
    Password Password used to protect the range. Use empty or null to have no password. Note: As this password is not saved in the file, when you open a file this property will be empty. You can know if a file has a password by looking at PasswordHash.
    Setting this property will set the PasswordHash property using the current EncryptionAlgorithm.
    PasswordHash This is the hash for the password that is stored in the file. You shouldn't set this property directly unless you are copying the hash from other place.
    When you set this property, Password will be reset.
    EncryptionAlgorithm Returns the encryption algorithm used to encrypt the password hash.
    Ranges Ranges of cells this protection applies to. You can specify more than one range of cells for the same ProtectedRange.
    Name Name of the protected range.
    SecurityDescriptor​XLSX Returns the security descriptor of the protected range, for XLSX files. This is a string used if you are giving permissions to some users in the range.
    Note that because of the different security descriptor formats, FlexCel won't convert between security descriptors from xls and xlsx. Take a look at APIMate to see the descriptor of a particular file.
    SecurityDescriptorXLS Returns the security descriptor of the protected range, for XLS files. This is a byte array encapsulating a Windows Security Descriptor, and it is used if you are giving permissions to some users in the range.
    Note that because of the different security descriptor formats, FlexCel won't convert between security descriptors from xls and xlsx. Take a look at APIMate to see the descriptor of a particular file.
    In This Article
    Back to top FlexCel Studio for VCL and FireMonkey v7.24
    © 2002 - 2025 tmssoftware.com