Back to Devexpress

ISpreadsheetComponent.InvalidFormatException Event

officefileapi-devexpress-dot-spreadsheet-dot-ispreadsheetcomponent-8e3da044.md

latest2.0 KB
Original Source

ISpreadsheetComponent.InvalidFormatException Event

Fires when the supplied data could not be recognized as data in the assumed format for import.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
event InvalidFormatExceptionEventHandler InvalidFormatException
vb
Event InvalidFormatException As InvalidFormatExceptionEventHandler

Event Data

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

PropertyDescription
ExceptionGets the exception which triggers the InvalidFormatException event.
SourceUriGets the source location for the document which triggers the InvalidFormatException event.

Remarks

If the data for import is in an incorrect format, import is silently canceled if the InvalidFormatException is not handled. If you subscribe to the InvalidFormatException event, the event is fired in an attempt to load incorrect data, so you can provide custom logic in this situation.

See Also

ISpreadsheetComponent Interface

ISpreadsheetComponent Members

DevExpress.Spreadsheet Namespace