@ SuppressWarnings ( "deprecation" ) public static Cell setCellValue ( final Cell c , final String value ) { try { if ( value . length ( ) == 0 ) { c . setCellType ( CellType . BLANK ) ; } else if ( WebSheetUtility . isNumeric ( value ) ) { setCellValueNumber ( c , value ) ; } else if ( WebSheetUtility . isDate ( value ) ) { setCellValueDate ( c , value ) ; } else if ( c . getCellTypeEnum ( ) == CellType . BOOLEAN ) { setCellValueBoolean ( c , value ) ; } else { setCellValueString ( c , value ) ; } } catch ( Exception e ) { LOG . log ( Level . SEVERE , " error in setCellValue of CellUtility = " + e . getLocalizedMessage ( ) , e ) ; setCellValueString ( c , value ) ; } return c ; }
Set cell value with giving String value .