GemBox.Spreadsheet

ExcelWorksheet.ExtractToDataTable Method (DataTable, Int32, ExtractDataOptions, DataColumnMappingCollection, ExcelRow)

Extracts data to DataTable with column mapping.

public void ExtractToDataTable(
   DataTable dataTable,
   int numberOfRows,
   ExtractDataOptions options,
   DataColumnMappingCollection dataColumnMappingCollection,
   ExcelRow startRow
);

Parameters

dataTable
Destination DataTable.
numberOfRows
Number of rows to extract.
options
Options that describe how data will be extracted.
dataColumnMappingCollection
Column mapping.
startRow
Start ExcelRow.

Remarks

DataTable has to have all the columns defined before calling this method. How will data be extracted from ExcelColumn to DataTableColumn has to be defined in the dataColumnMappingCollection argument.

See Also

ExcelWorksheet Class | GemBox.Spreadsheet Namespace | ExcelWorksheet.ExtractToDataTable Overload List