Description
Reads entire DataTable and adds it as a worksheet starting on the Row and Column index selected. Allows you to select whether or not to use the DataTable.Column names as the first row Allows you to choose how the new sheet is named. Either via the current selected worksheet or by the datatable name

Namespace: Docs.Excel
Assembly: Excel (in Excel.dll) Version: 3.1.0.0 (3.1)

Syntax

         
 C#  Visual Basic  Visual C++ 
public void ReadFromDataTable(
	int StartRowIndex,
	int StartColumnIndex,
	DataTable DTable,
	bool namedColumns,
	bool namedDataTable,
	bool parseValues
)
Public Sub ReadFromDataTable ( _
	StartRowIndex As Integer, _
	StartColumnIndex As Integer, _
	DTable As DataTable, _
	namedColumns As Boolean, _
	namedDataTable As Boolean, _
	parseValues As Boolean _
)
public:
void ReadFromDataTable(
	int StartRowIndex, 
	int StartColumnIndex, 
	DataTable^ DTable, 
	bool namedColumns, 
	bool namedDataTable, 
	bool parseValues
)

Parameters

StartRowIndex
Int32
Index of the row you wish to start the datatable insert.
StartColumnIndex
Int32
Column of the row you wish to start the datatable insert.
DTable
DataTable
Data.DataTable
namedColumns
Boolean
Set true to use DataTable.Column names as the first row inserted.
namedDataTable
Boolean
Set true to use the name of the datatable as the worksheet name, set false to add it as the name of the current worksheet selected.
parseValues
Boolean
If true - imported values will be parsed; otherwise - values persist original types.

See Also