Back to Devexpress

EncryptedFilePasswordCheckFailedEventArgs.Error Property

officefileapi-devexpress-dot-spreadsheet-dot-encryptedfilepasswordcheckfailedeventargs.md

latest3.5 KB
Original Source

EncryptedFilePasswordCheckFailedEventArgs.Error Property

Obtains the password error.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public SpreadsheetDecryptionError Error { get; }
vb
Public ReadOnly Property [Error] As SpreadsheetDecryptionError

Property Value

TypeDescription
SpreadsheetDecryptionError

One of the SpreadsheetDecryptionError enumeration values indicating the error type.

|

Available values:

NameDescription
PasswordRequired

Indicates that an .xls binary file is encrypted and you should set the XlsDocumentImporterOptions.Password property to a password string.

| | WrongPassword |

The password specified by the XlsDocumentImporterOptions.Password property is incorrect.

| | EncryptionTypeNotSupported |

Indicates that the encryption type is not supported. For example, this error occurs when you open an XLS file that uses RC4 CryptoAPI encryption with third-party cryptographic service providers.

| | IntegrityCheckFailed |

Indicates that the document being loaded did not pass the HMAC verification.

|

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

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/CS/EncryptionExample/Program.cs#L80

csharp
{
    switch (e.Error)
    {

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

vb
Private Shared Sub Workbook_EncryptedFilePasswordCheckFailed(ByVal sender As Object, ByVal e As EncryptedFilePasswordCheckFailedEventArgs)
    Select Case e.Error
        Case SpreadsheetDecryptionError.PasswordRequired

See Also

EncryptedFilePasswordCheckFailedEventArgs Class

EncryptedFilePasswordCheckFailedEventArgs Members

DevExpress.Spreadsheet Namespace