Document Solutions for Excel, .NET Edition | Document Solutions
GrapeCity.Documents.Excel Namespace / IRange Interface / ImportData Method / ImportData(DataTable,DataImportOptions) Method
The table to import. The column type can be:
The import options.
In This Topic
    ImportData(DataTable,DataImportOptions) Method
    In This Topic
    Imports data from a table to the range.
    Syntax
    DataImportResult ImportData( 
       System.Data.DataTable table,
       DataImportOptions options
    )

    Parameters

    table
    The table to import. The column type can be:
    • Primitive types: System.SByte, System.Byte, System.Int16, System.UInt16, System.Int32, System.UInt32, System.Int64, System.UInt64, System.Single, System.Double, System.Decimal, System.Boolean, System.DateTime, System.TimeSpan or CalcError.
    • Nullable primitives: System.String or System.Nullable`1 where T is a primitive type.
    options
    The import options.
    Exceptions
    ExceptionDescription
    The data type of a column is inconsistent.
    options contains incorrect information.
    It's typically thrown when AOT compatibility issues occur at runtime.
    See Also