【发布时间】:2017-03-07 05:24:44
【问题描述】:
# 我正在使用 Apache POI 读取 excel 文件。无法读取日期。在 excel 中,日期格式 2017-03-15 6:00(单元格格式=自定义)& 使用 poi,读取 42809.25
cell = ExcelWSheet.getRow(RowNum).getCell(ColNum);
int dataType = cell.getCellType();
if (dataType == 0) {
String cellData1 = NumberToTextConverter.toText(cell.getNumericCellValue());
return cellData1;
} else {
String cellData = cell.getStringCellValue();
return cellData;
}
【问题讨论】:
标签: apache-poi