/** * @since POI 4.0 * @return cell type of cached formula result */ @Override public CellType getCachedFormulaResultType() { return _cell.getCachedFormulaResultType(); }
/** * Only valid for formula cells * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * on the cached value of the formula * @since POI 3.15 beta 3 * @deprecated use <code>getCachedFormulaResultType</code> * Will be deleted when we make the CellType enum transition. See bug 59791. */ @Deprecated @Removal(version="4.2") @Override public CellType getCachedFormulaResultTypeEnum() { return getCachedFormulaResultType(); }
text.append(cell.getCellFormula()); } else { switch(cell.getCachedFormulaResultType()) { case STRING: HSSFRichTextString str = cell.getRichStringCellValue(); break; default: throw new IllegalStateException("Unexpected cell cached formula result type: " + cell.getCachedFormulaResultType());
/** * @since POI 4.0 * @return cell type of cached formula result */ @Override public CellType getCachedFormulaResultType() { return _cell.getCachedFormulaResultType(); }
public int getCachedFormulaResultType() { return _cell.getCachedFormulaResultType(); } }
public int getCachedFormulaResultType() { return _cell.getCachedFormulaResultType(); } }
/** * Only valid for formula cells * @return one of ({@link CellType#NUMERIC}, {@link CellType#STRING}, * {@link CellType#BOOLEAN}, {@link CellType#ERROR}) depending * on the cached value of the formula * @since POI 3.15 beta 3 * @deprecated use <code>getCachedFormulaResultType</code> * Will be deleted when we make the CellType enum transition. See bug 59791. */ @Deprecated @Removal(version="4.2") @Override public CellType getCachedFormulaResultTypeEnum() { return getCachedFormulaResultType(); }
public static double getCellValue(HSSFCell cell){ switch (cell.getCachedFormulaResultType()){ case Cell.CELL_TYPE_NUMERIC: return cell.getNumericCellValue(); break; case Cell.CELL_TYPE_STRING: return Double.parse(cell.getStringCellValue()); break; default: throw new RuntimeException("Data type not applicable"); } }
private Object getCellValue(HSSFCell cell) { if (cell == null) { return null; } if (cell.getCellType() == Cell.CELL_TYPE_FORMULA) { switch (cell.getCachedFormulaResultType()) { case Cell.CELL_TYPE_NUMERIC: return cell.getNumericCellValue(); case Cell.CELL_TYPE_STRING: return cell.getStringCellValue().replaceAll("'", ""); } } return null; }
break; case FORMULA: switch ( cell.getCachedFormulaResultType() ) POILogger.WARN, "Unexpected cell cachedFormulaResultType (" + cell.getCachedFormulaResultType() + ")" ); value = ExcelToHtmlUtils.EMPTY; break;
break; case HSSFCell.CELL_TYPE_FORMULA: switch ( cell.getCachedFormulaResultType() ) POILogger.WARN, "Unexpected cell cachedFormulaResultType (" + cell.getCachedFormulaResultType() + ")" ); value = ExcelToHtmlUtils.EMPTY; break;
break; case FORMULA: switch ( cell.getCachedFormulaResultType() ) { case STRING: HSSFRichTextString str = cell.getRichStringCellValue(); POILogger.WARN, "Unexpected cell cachedFormulaResultType (" + cell.getCachedFormulaResultType() + ")" ); value = ExcelToHtmlUtils.EMPTY; break;
break; case HSSFCell.CELL_TYPE_FORMULA: switch ( cell.getCachedFormulaResultType() ) POILogger.WARN, "Unexpected cell cachedFormulaResultType (" + cell.getCachedFormulaResultType() + ")" ); value = ExcelToHtmlUtils.EMPTY; break;
text.append(cell.getCellFormula()); } else { switch(cell.getCachedFormulaResultType()) { case STRING: HSSFRichTextString str = cell.getRichStringCellValue(); break; default: throw new IllegalStateException("Unexpected cell cached formula result type: " + cell.getCachedFormulaResultType());
text.append(cell.getCellFormula()); } else { switch(cell.getCachedFormulaResultType()) { case HSSFCell.CELL_TYPE_STRING: HSSFRichTextString str = cell.getRichStringCellValue();
text.append(cell.getCellFormula()); } else { switch(cell.getCachedFormulaResultType()) { case HSSFCell.CELL_TYPE_STRING: HSSFRichTextString str = cell.getRichStringCellValue();
break; case FORMULA: switch ( cell.getCachedFormulaResultType() )
break; case HSSFCell.CELL_TYPE_FORMULA: switch ( cell.getCachedFormulaResultType() )