switch (cell.getCellType()){
case Cell.CELL_TYPE_NUMERIC: //数字
cellValue = stringDateProcess(cell);
break;
case Cell.CELL_TYPE_STRING: //字符串
cellValue = String.valueOf(cell.getStringCellValue());
break;
case Cell.CELL_TYPE_BOOLEAN: //Boolean
cellValue = String.valueOf(cell.getBooleanCellValue());
break;
case Cell.CELL_TYPE_FORMULA: //公式
cellValue = String.valueOf(cell.getCellFormula());
break;
case Cell.CELL_TYPE_BLANK: //空值
cellValue = "";
break;
case Cell.CELL_TYPE_ERROR: //故障
cellValue = "非法字符";
break;
default:
cellValue = "未知类型";
break;
}

相关文章:

  • 2022-12-23
  • 2021-06-13
  • 2021-05-21
  • 2021-10-02
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
猜你喜欢
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-01-03
  • 2021-11-19
相关资源
相似解决方案