New to Telerik Document ProcessingStart a free 30-day trial

Thrown when a worksheet column contains mixed data types that cannot be reconciled during DataTable export with type inference enabled.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.FormatProviders

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class InvalidDataTypeException : Exception, ISerializable

Inheritance: objectExceptionInvalidDataTypeException

Implements: ISerializable

Inherited Members Exception.GetBaseException()Exception.ToString()Exception.GetType()Exception.TargetSiteException.MessageException.DataException.InnerExceptionException.HelpLinkException.SourceException.HResultException.StackTraceException.SerializeObjectState...

Constructors

Initializes a new instance of the InvalidDataTypeException class with details about the type conflict.

C#
public InvalidDataTypeException(string message, string expectedDataType, string currentDataType, int columnIndex, int rowIndex)
Parameters:messagestring

The message that describes the error.

expectedDataTypestring

The expected DataType.

currentDataTypestring

The data type of the current cell.

columnIndexint

The index of the column where the invalid data is.

rowIndexint

The index of the row where the invalid data is.

Properties

Gets the zero-based column index where the type conflict occurred.

C#
public int ColumnIndex { get; }

Gets the conflicting data type encountered in the cell.

C#
public string CurrentDataType { get; }

Gets the data type initially inferred for the column.

C#
public string ExpectedDataType { get; }

Gets the zero-based row index where the type conflict occurred.

C#
public int RowIndex { get; }