private HSSFCell copyCellFromTemplate ( HSSFCell templateCell , HSSFRow resultRow , int resultColumn , BandData band ) { checkThreadInterrupted ( ) ; if ( templateCell == null ) return null ; HSSFCell resultCell = resultRow . createCell ( resultColumn ) ; HSSFCellStyle templateStyle = templateCell . getCellStyle ( ) ; HSSFCellStyle resultStyle = copyCellStyle ( templateStyle ) ; resultCell . setCellStyle ( resultStyle ) ; String templateCellValue = "" ; int cellType = templateCell . getCellType ( ) ; if ( cellType != HSSFCell . CELL_TYPE_FORMULA && cellType != HSSFCell . CELL_TYPE_NUMERIC ) { HSSFRichTextString richStringCellValue = templateCell . getRichStringCellValue ( ) ; templateCellValue = richStringCellValue != null ? richStringCellValue . getString ( ) : "" ; templateCellValue = extractStyles ( templateCell , resultCell , templateCellValue , band ) ; } if ( cellType == HSSFCell . CELL_TYPE_STRING && containsJustOneAlias ( templateCellValue ) ) { updateValueCell ( rootBand , band , templateCellValue , resultCell , drawingPatriarchsMap . get ( resultCell . getSheet ( ) ) ) ; } else { String cellValue = inlineBandDataToCellString ( templateCell , templateCellValue , band ) ; setValueToCell ( resultCell , cellValue , cellType ) ; } return resultCell ; }
copies template cell to result row into result column . Fills this cell with data from band