@ SuppressWarnings ( "deprecation" ) public static String getCellValueWithFormat ( final Cell poiCell , final FormulaEvaluator formulaEvaluator , final DataFormatter dataFormatter ) { if ( poiCell == null ) { return null ; } String result ; try { CellType cellType = poiCell . getCellTypeEnum ( ) ; if ( cellType == CellType . FORMULA ) { cellType = formulaEvaluator . evaluate ( poiCell ) . getCellTypeEnum ( ) ; } if ( cellType == CellType . ERROR ) { result = "" ; } else { result = dataFormatter . formatCellValue ( poiCell , formulaEvaluator ) ; } } catch ( Exception e ) { LOG . log ( Level . SEVERE , "Web Form WebFormHelper getCellValue Error row = " + poiCell . getRowIndex ( ) + " column = " + poiCell . getColumnIndex ( ) + " error = " + e . getLocalizedMessage ( ) + "; Change return result to blank" , e ) ; result = "" ; } return result ; }
return cell value with format .