Back to Devexpress

Workbook.EncryptedFilePasswordCheckFailed Event

officefileapi-devexpress-dot-spreadsheet-dot-workbook-0a100665.md

latest4.5 KB
Original Source

Workbook.EncryptedFilePasswordCheckFailed Event

Occurs when the encryption password is empty or invalid.

You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this event in production code.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public event EncryptedFilePasswordCheckFailedEventHandler EncryptedFilePasswordCheckFailed
vb
Public Event EncryptedFilePasswordCheckFailed As EncryptedFilePasswordCheckFailedEventHandler

Event Data

The EncryptedFilePasswordCheckFailed event's data class is EncryptedFilePasswordCheckFailedEventArgs. The following properties provide information specific to this event:

PropertyDescription
DocumentNameGets the encrypted document’s name.
ErrorObtains the password error.
HandledGets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing. Inherited from HandledEventArgs.
TryAgainGets or sets whether to request a password again.

Remarks

Hanlde the EncryptedFilePasswordCheckFailed event to determine the password error (PasswordRequired or WrongPassword), and specify whether to enable a new password request (TryAgain).

If the TryAgain property is set to true , the Workbook.EncryptedFilePasswordRequest event occurs. The Workbook.InvalidFormatException event fires when the TryAgain property is not specifies or set to false.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EncryptedFilePasswordCheckFailed event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

spreadsheet-document-api-encryption/VB/EncryptionExample/Program.vb#L17

vb
AddHandler workbook.EncryptedFilePasswordRequest, AddressOf Workbook_EncryptedFilePasswordRequest
AddHandler workbook.EncryptedFilePasswordCheckFailed, AddressOf Workbook_EncryptedFilePasswordCheckFailed
AddHandler workbook.InvalidFormatException, AddressOf Workbook_InvalidFormatException

Implements

EncryptedFilePasswordCheckFailed

See Also

Workbook Class

Workbook Members

DevExpress.Spreadsheet Namespace