Click or drag to resize

XlsWorksheet InsertDataTable Method (DataTable, Boolean, Int32, Int32, Int32, Int32, DataColumn , Boolean)

Imports data from a DataTable into worksheet

Namespace: Spire.Xls.Core.Spreadsheet
Assembly: Spire.XLS (in Spire.XLS.dll) Version: 15.4.0.0 (15.4.0.5046)
Syntax
public int InsertDataTable(
	DataTable dataTable,
	bool columnHeaders,
	int firstRow,
	int firstColumn,
	int maxRows,
	int maxColumns,
	DataColumn[] columnsArray,
	bool transTypes
)

Parameters

dataTable
Type: System.Data DataTable
DataTable
columnHeaders
Type: System Boolean
Indicates whether to import field names.
firstRow
Type: System Int32
The row number of the first cell to import in.
firstColumn
Type: System Int32
The column number of the first cell to import in.
maxRows
Type: System Int32
Maximum number of rows to import
maxColumns
Type: System Int32
Maximum number of columns to import
columnsArray
Type: System.Data DataColumn
Array of columns to import.
transTypes
Type: System Boolean
Indicates if preserve types when insert data into worksheet.true is default

Return Value

Type: Int32
See Also