TProtectedRange Class
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
Namespace: FlexCel.Core
public sealed class TProtectedRange
Constructors
Name | Description |
---|---|
TProtectedRange | Overloaded TProtectedRange TProtectedRange(String, String, TXlsCellRange[]) |
Methods
Name | Description |
---|---|
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 |
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. |
SecurityDescriptorXLSX | 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. |