Winnovative Excel Library for .NET
GetDataTable Method (sourceRange, getColumnNames, getColumnDataTypes, getFormulaResult)
NamespacesWinnovative.ExcelLibExcelWorksheetGetDataTable(ExcelRange, Boolean, Boolean, Boolean)
Winnovative Excel Library for .NET
Gets a System.Data.DataTable object from the specified source range. If the getColumnNames parameter is true the first row of the range will be used to obtain names for the DataTable columns. If the getFormulaResult parameter is true the result values of the formulas evaluation will be exported If the getColumnDataTypes is true the data type of the first value of the range column will give the data type of the corresponding column in the resulted DataTable.
Declaration Syntax
C#Visual BasicVisual C++
public DataTable GetDataTable(
	ExcelRange sourceRange,
	bool getColumnNames,
	bool getColumnDataTypes,
	bool getFormulaResult
)
Public Function GetDataTable ( _
	sourceRange As ExcelRange, _
	getColumnNames As Boolean, _
	getColumnDataTypes As Boolean, _
	getFormulaResult As Boolean _
) As DataTable
public:
DataTable^ GetDataTable(
	ExcelRange^ sourceRange, 
	bool getColumnNames, 
	bool getColumnDataTypes, 
	bool getFormulaResult
)
Parameters
sourceRange (ExcelRange)
The worksheet range from where to get the values.
getColumnNames (Boolean)
If this parameter is true the first row of the range will be used to obtain names for the DataTable columns.
getColumnDataTypes (Boolean)
If this parameter is true the data type of the first value of the range column will give the data type of the corresponding column in the resulted DataTable.
getFormulaResult (Boolean)
If the getFormulaResult parameter is true the result values of the formulas evaluation will be exported
Return Value
The resulted DataTable.

Assembly: Winnovative.ExcelLib (Module: Winnovative.ExcelLib) Version: 2.1.0.0 (2.1.0.0)