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 |
| EncryptionAlgorithmXlsx |
Encryption algorithm for xlsx files.
|
| EncryptionType |
Encryption mode for xls files.
Security note: xls encryption is provided for legacy compatibility and uses old algorithms. For new confidential files, save as xlsx and use the Agile xlsx encryption instead.
|
| HasModifyPassword |
Returns true if the file has a password to modify.
|
| HasSharedWorkbookPassword |
Returns true if the change history is protected with a password.
|
| HasSheetPassword |
Returns true if the active sheet is protected with a password.
|
| HasWorkbookPassword |
Returns true if the workbook is protected with a password.
|
| 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.
|
| ProtectedRangeCount |
Returns a the count of protected ranges in the active sheet.
|
| RecommendReadOnly |
Returns true if the file is recommended to open read-only.
|
| 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.
|
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.
|