ExpertXls Excel Library for .NET
GetDataTable Method (sourceRange, getColumnNames)
Namespaces ► ExpertXls.ExcelLib ► ExcelWorksheet ► GetDataTable(ExcelRange, Boolean)
ExpertXls 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.
Declaration Syntax

C# | Visual Basic | Visual C++

    public DataTable GetDataTable(
    	ExcelRange sourceRange,
    	bool getColumnNames
    )

    Public Function GetDataTable ( _
    	sourceRange As ExcelRange, _
    	getColumnNames As Boolean _
    ) As DataTable

    public:
    DataTable^ GetDataTable(
    	ExcelRange^ sourceRange,
    	bool getColumnNames
    )

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.

Return Value
The resulted DataTable.

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