protected void updateValueCell ( BandData rootBand , BandData bandData , String templateCellValue , HSSFCell resultCell , HSSFPatriarch patriarch ) { String parameterName = templateCellValue ; parameterName = unwrapParameterName ( parameterName ) ; String fullParameterName = bandData . getName ( ) + "." + parameterName ; if ( StringUtils . isEmpty ( parameterName ) ) return ; if ( ! bandData . getData ( ) . containsKey ( parameterName ) ) { resultCell . setCellValue ( ( String ) null ) ; return ; } Object value = bandData . getData ( ) . get ( parameterName ) ; if ( value == null ) { resultCell . setCellType ( HSSFCell . CELL_TYPE_BLANK ) ; return ; } String formatString = getFormatString ( parameterName , fullParameterName ) ; InlinerAndMatcher inlinerAndMatcher = getContentInlinerForFormat ( formatString ) ; if ( inlinerAndMatcher != null ) { inlinerAndMatcher . contentInliner . inlineToXls ( patriarch , resultCell , value , inlinerAndMatcher . matcher ) ; return ; } if ( formatString != null ) { resultCell . setCellValue ( new HSSFRichTextString ( formatValue ( value , parameterName , fullParameterName ) ) ) ; } else if ( value instanceof Number ) { resultCell . setCellValue ( ( ( Number ) value ) . doubleValue ( ) ) ; } else if ( value instanceof Boolean ) { resultCell . setCellValue ( ( Boolean ) value ) ; } else if ( value instanceof Date ) { resultCell . setCellValue ( ( Date ) value ) ; } else { resultCell . setCellValue ( new HSSFRichTextString ( formatValue ( value , parameterName , fullParameterName ) ) ) ; } }
Copies template cell to result cell and fills it with bandData data