Aspose.cells打开文件之后输出为DataTable,是将第一行作为数据类型判断,列具有混合数据集
错误代码
var cells = workbook.Worksheets[0].Cells; var detailTable = cells.ExportDataTable(0, 0, cells.MaxRow + 1, cells.MaxColumn + 1, exportTableOptions);
正确代码
var cells = workbook.Worksheets[0].Cells; var exportTableOptions = new ExportTableOptions { CheckMixedValueType = false, ExportColumnName = true, ExportAsString = true }; var detailTable = cells.ExportDataTable(0, 0, cells.MaxRow + 1, cells.MaxColumn + 1, exportTableOptions);
标签:detailTable,cells,value,should,cell,var,C1,exportTableOptions From: https://www.cnblogs.com/yongxinwang/p/17242953.html