ExportDataTable
内容
[
隐藏
]ExportDataTable(int, int, int, int)
导出数据Cells
收集到DataTable对象.
public DataTable ExportDataTable(int firstRow, int firstColumn, int totalRows, int totalColumns)
范围 | 类型 | 描述 |
---|---|---|
firstRow | Int32 | 要导出的第一个单元格的行号。 |
firstColumn | Int32 | 要导出的第一个单元格的列号。 |
totalRows | Int32 | 要导入的行数。 |
totalColumns | Int32 | 要导入的列数。 |
返回值
出口DataTable目的。
评论
如果您使用此方法导出一个数据块,请确保 列中的数据应该是相同的数据类型。否则,使用ExportDataTableAsString
方法代替。
例子
[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)
也可以看看
- class Cells
- 命名空间 Aspose.Cells
- 部件 Aspose.Cells
ExportDataTable(int, int, int, int, bool)
导出数据Cells
收集到DataTable对象.
public DataTable ExportDataTable(int firstRow, int firstColumn, int totalRows, int totalColumns,
bool exportColumnName)
范围 | 类型 | 描述 |
---|---|---|
firstRow | Int32 | 要导出的第一个单元格的行号。 |
firstColumn | Int32 | 要导出的第一个单元格的列号。 |
totalRows | Int32 | 要导入的行数。 |
totalColumns | Int32 | 要导入的列数。 |
exportColumnName | Boolean | 指示是否将第一行中的数据导出到 DataTable 的列名。 |
返回值
出口DataTable目的。
也可以看看
- class Cells
- 命名空间 Aspose.Cells
- 部件 Aspose.Cells
ExportDataTable(int, int, int, int, ExportTableOptions)
导出数据Cells
收集到DataTable对象.
public DataTable ExportDataTable(int firstRow, int firstColumn, int totalRows, int totalColumns,
ExportTableOptions options)
范围 | 类型 | 描述 |
---|---|---|
firstRow | Int32 | 要导出的第一个单元格的行号。 |
firstColumn | Int32 | 要导出的第一个单元格的列号。 |
totalRows | Int32 | 要导入的行数。 |
totalColumns | Int32 | 要导入的列数。 |
options | ExportTableOptions | 所有导出表选项 |
返回值
出口DataTable目的。
也可以看看
- class ExportTableOptions
- class Cells
- 命名空间 Aspose.Cells
- 部件 Aspose.Cells