CellsImportDataTable Method (DataTable, Boolean, Int32, Int32, Int32, Int32, Boolean, String)

Note: This API is now obsolete.

Imports a DataTable into a worksheet.

Namespace:  Aspose.Cells
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: 21.6.0.0 (21.6)
Syntax
[ObsoleteAttribute("Use Cells.ImportData(DataTable,int,int,ImportTableOptions) method, instead.")]
public int ImportDataTable(
	DataTable dataTable,
	bool isFieldNameShown,
	int firstRow,
	int firstColumn,
	int rowNumber,
	int columnNumber,
	bool insertRows,
	string dateFormatString
)

Parameters

dataTable
Type: System.DataDataTable
The DataTable object to be imported.
isFieldNameShown
Type: SystemBoolean
Indicates whether the field name of the datatable will be imported to the first row. Default is true.
firstRow
Type: SystemInt32
The row number of the first cell to import in.
firstColumn
Type: SystemInt32
The column number of the first cell to import in.
rowNumber
Type: SystemInt32
Number of rows to be imported.
columnNumber
Type: SystemInt32
Number of columns to be imported.
insertRows
Type: SystemBoolean
Indicates whether extra rows are added to fit data.
dateFormatString
Type: SystemString
Date format string for cells.

Return Value

Type: Int32
Total number of rows imported.
Remarks
This method automatically format date time values. However, if the DateTable is very huge, this method may slow down the program. In this case, you'd better format the cell manually.
Remarks
NOTE: This member is now obsolete. Instead, please use Cells.ImportData(DataTable,int,int,ImportTableOptions) method, instead. This property will be removed 12 months later since December 2018. Aspose apologizes for any inconvenience you may have experienced.
See Also