原因
解决
private static String getCellValue(Cell cell) {
String resultValue = "";
if (Objects.isNull(cell)) {
return resultValue;
}
int cellType = cell.getCellType();
switch (cellType) {
case Cell.CELL_TYPE_STRING:
resultValue = StringUtils.isEmpty(cell.getStringCellValue()) ? "" : cell.getStringCellValue().trim();
break;
case Cell.CELL_TYPE_BOOLEAN:
resultValue = String.valueOf(cell.getBooleanCellValue());
break;
case Cell.CELL_TYPE_NUMERIC:
resultValue = new DecimalFormat("#.######").format(cell.getNumericCellValue());
break;
default:
break;
}
return resultValue;
}