Cells.ExportDataTable
Contents
[
Hide
]ExportDataTable(int, int, int, int)
Exports data in the Cells
collection to a DataTable object.
public DataTable ExportDataTable(int firstRow, int firstColumn, int totalRows, int totalColumns)
Parameter | Type | Description |
---|---|---|
firstRow | Int32 | The row number of the first cell to export out. |
firstColumn | Int32 | The column number of the first cell to export out. |
totalRows | Int32 | Number of rows to be imported. |
totalColumns | Int32 | Number of columns to be imported. |
Return Value
Exported DataTable object.
Remarks
If you use this method to export a block of data, please be sure that the data in a column should be the same data type. Otherwise, use the ExportDataTableAsString
method instead.
Examples
[C#]
string designerFile = "List.xls";
Workbook excel = new Workbook(designerFile);
Worksheet sheet = excel.Worksheets[0];
DataTable dt = sheet.Cells.ExportDataTable(6, 1, 69, 4);
[Visual Basic]
Dim designerFile As String = "List.xls"
Dim excel As excel = New excel(designerFile)
Dim sheet As Worksheet = excel.Worksheets(0)
Dim dt As DataTable = sheet.Cells.ExportDataTable(6, 1, 69, 4)
See Also
- class Cells
- namespace Aspose.Cells
- assembly Aspose.Cells
ExportDataTable(int, int, int, int, bool)
Exports data in the Cells
collection to a DataTable object.
public DataTable ExportDataTable(int firstRow, int firstColumn, int totalRows, int totalColumns,
bool exportColumnName)
Parameter | Type | Description |
---|---|---|
firstRow | Int32 | The row number of the first cell to export out. |
firstColumn | Int32 | The column number of the first cell to export out. |
totalRows | Int32 | Number of rows to be imported. |
totalColumns | Int32 | Number of columns to be imported. |
exportColumnName | Boolean | Indicates whether the data in the first row are exported to the column name of the DataTable. |
Return Value
Exported DataTable object.
See Also
- class Cells
- namespace Aspose.Cells
- assembly Aspose.Cells
ExportDataTable(int, int, int, int, ExportTableOptions)
Exports data in the Cells
collection to a DataTable object.
public DataTable ExportDataTable(int firstRow, int firstColumn, int totalRows, int totalColumns,
ExportTableOptions options)
Parameter | Type | Description |
---|---|---|
firstRow | Int32 | The row number of the first cell to export out. |
firstColumn | Int32 | The column number of the first cell to export out. |
totalRows | Int32 | Number of rows to be imported. |
totalColumns | Int32 | Number of columns to be imported. |
options | ExportTableOptions | All export table options |
Return Value
Exported DataTable object.
See Also
- class ExportTableOptions
- class Cells
- namespace Aspose.Cells
- assembly Aspose.Cells