TProtection Class
Encryption data for an Excel sheet.
Syntax
Unit: FlexCel.Core
TProtection = class(TFlexCelObject);
Constructors
Name |
Description |
Create |
Creates a new TProtection instance and initializes it.
|
Methods
Properties
Name |
Description |
EncryptionType |
Encryption mode for xls files .
|
EncryptionAlgorithmXlsx |
Encryption algorithm for xlsx files.
|
OpenPassword |
Sets the password to open the file. When set, the file will be encrypted. On Excel go to Options->Security to check it. Set this to null to clear it.
|
HasModifyPassword |
Returns true if the file has a password to modify.
|
RecommendReadOnly |
Returns true if the file is recommended to open read-only.
|
HasWorkbookPassword |
Returns true if the workbook is protected with a password.
|
HasSharedWorkbookPassword |
Returns true if the change history is protected with a password.
|
HasSheetPassword |
Returns true if the active sheet is protected with a password.
|
WriteAccess |
Reads or sets the user writing the file. Useful to know which user opened the file in Excel when you want to save and the file is in use.
|
ProtectedRangeCount |
Returns a the count of protected ranges in the active sheet.
|
Events
Name |
Description |
OnPassword |
It is called when opening a password protected file, so you can supply the correct password. If you know beforehand that the file is protected you do not need this event, just use the OpenPassword method on this object.
|