WorkbookImportOptions.ThrowExceptionOnInvalidDocument Property
Specifies whether an exception should be thrown when importing an invalid document.
Namespace: DevExpress.XtraSpreadsheet.Import
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Property Value
Type | Description |
---|---|
Boolean | true, if an exception is thrown when importing an invalid document; otherwise, false. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to ThrowExceptionOnInvalidDocument |
---|---|
DocumentOptions |
|
Remarks
Every time you try to load an invalid document into the SpreadsheetControl or Workbook, the SpreadsheetControl.InvalidFormatException or Workbook.InvalidFormatException event fires. You can subscribe to this event and perform the actions required to resolve this situation (for example, inform an end-user about the incorrect file). If the ThrowExceptionOnInvalidDocument property is set to true, an exception is thrown after the InvalidFormatException event has occurred.