List of usage examples for org.apache.poi.hssf.usermodel HSSFCell getCachedFormulaResultTypeEnum
@Deprecated @Removal(version = "4.2") @Override public CellType getCachedFormulaResultTypeEnum()
From source file:de.viaboxx.nlstools.formats.MBExcelPersistencer.java
License:Apache License
private Object getValue(HSSFCell cell, CellType cellType) { switch (cellType) { case NUMERIC: if (HSSFDateUtil.isCellDateFormatted(cell)) { return cell.getDateCellValue(); } else {/*from w ww .jav a2s . co m*/ return cell.getNumericCellValue(); } case FORMULA: return getValue(cell, cell.getCachedFormulaResultTypeEnum()); case BOOLEAN: return cell.getBooleanCellValue(); case STRING: return cell.getStringCellValue(); case ERROR: return cell.getErrorCellValue(); default: return null; // do not handle Formular, Error, Blank, ... } }