wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-efbefc22.md
Fires when the supplied data could not be recognized as data in the assumed format for import.
Namespace : DevExpress.Xpf.Spreadsheet
Assembly : DevExpress.Xpf.Spreadsheet.v25.2.dll
NuGet Package : DevExpress.Wpf.Spreadsheet
public event InvalidFormatExceptionEventHandler InvalidFormatException
Public Event InvalidFormatException As InvalidFormatExceptionEventHandler
The InvalidFormatException event's data class is SpreadsheetInvalidFormatExceptionEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Exception | Gets the exception which triggers the InvalidFormatException event. |
| SourceUri | Gets the source location for the document which triggers the InvalidFormatException event. |
If the data for import is in an incorrect format, the control silently cancels import if the InvalidFormatException is not handled. If you subscribe to the InvalidFormatException event, the event is fired when the control attempts to load incorrect data, so you can provide custom logic in this situation.
See Also