src/main/java/org/braisdom/excel/WorkbookTemplate.java
private void processCellElement(int rowIndex, String rowStyle, int columnIndex, Element cellElement, RowWriter rowWriter) {
        String rawAssignedCellIndex = cellElement.attributeValue(WorkbookAttribute.COLUMN.getValue());
        String rawRowSpan = cellElement.attributeValue(WorkbookAttribute.ROWSPAN.getValue());
        String rawColumnSpan = cellElement.attributeValue(WorkbookAttribute.COLSPAN.getValue());
        String style = cellElement.attributeValue(WorkbookAttribute.STYLE.getValue());

        boolean quotePrefix = Boolean.valueOf(cellElement.attributeValue(WorkbookAttribute.QUOTE_PREFIXED.getValue()));

        int assignedColumnIndex = rawAssignedCellIndex == null ? columnIndex : StyleUtils.safeInteger(rawAssignedCellIndex);
        int rowSpan = StyleUtils.safeInteger(rawRowSpan);
        int columnSpan = StyleUtils.safeInteger(rawColumnSpan);

        CellWriter cellWriter = rowWriter.createCellWriter(assignedColumnIndex);
        cellWriter.setValue(cellElement.getText().trim());
        cellWriter.setQuotePrefix(quotePrefix);
        cellWriter.setRowColumnSpan(rowIndex, assignedColumnIndex, rowSpan, columnSpan);

        if (CCSSValue.INHERIT.equals(style) && rowStyle != null)
            cellWriter.setStyle(rowStyle);
        if (style != null)
            cellWriter.setStyle(style);
    }
/**
     * Generating the cell of Excel and attaching the style of cell.
     *
     * @param rowIndex    The real row index of Excel.
     * @param rowStyle    The row style for cell inheriting.
     * @param columnIndex The real column index of Excel.
     * @param cellElement The structured cell element who has the definition of CSS and the attributes.
     * @param rowWriter   The row writer of Excel, it will be used for creating cell writer.
     */
Generating the cell of Excel and attaching the style of cell.
@param rowIndex    The real row index of Excel.
@param rowStyle    The row style for cell inheriting.
@param columnIndex The real column index of Excel.
@param cellElement The structured cell element who has the definition of CSS and the attributes.
@param rowWriter   The row writer of Excel, it will be used for creating cell writer.
Generating the cell of Excel and attaching the style of cell . @param rowIndex The real row index of Excel . @param rowStyle The row style for cell inheriting . @param columnIndex The real column index of Excel . @param cellElement The structured cell element who has the definition of CSS and the attributes . @param rowWriter The row writer of Excel it will be used for creating cell writer .
private void processCellElement(int rowIndex, String rowStyle, int columnIndex, Element cellElement, RowWriter rowWriter) {
        String rawAssignedCellIndex = cellElement.attributeValue(WorkbookAttribute.COLUMN.getValue());
        String rawRowSpan = cellElement.attributeValue(WorkbookAttribute.ROWSPAN.getValue());
        String rawColumnSpan = cellElement.attributeValue(WorkbookAttribute.COLSPAN.getValue());
        String style = cellElement.attributeValue(WorkbookAttribute.STYLE.getValue());
        boolean quotePrefix = Boolean.valueOf(cellElement.attributeValue(WorkbookAttribute.QUOTE_PREFIXED.getValue()));
        int assignedColumnIndex = rawAssignedCellIndex == null ? columnIndex : StyleUtils.safeInteger(rawAssignedCellIndex);
        int rowSpan = StyleUtils.safeInteger(rawRowSpan);
        int columnSpan = StyleUtils.safeInteger(rawColumnSpan);
        CellWriter cellWriter = rowWriter.createCellWriter(assignedColumnIndex);
        cellWriter.setValue(cellElement.getText().trim());
        cellWriter.setQuotePrefix(quotePrefix);
        cellWriter.setRowColumnSpan(rowIndex, assignedColumnIndex, rowSpan, columnSpan);
        if (CCSSValue.INHERIT.equals(style) && rowStyle != null)
            cellWriter.setStyle(rowStyle);
        if (style != null)
            cellWriter.setStyle(style);
    }
private void processCellElement ( int rowIndex , String rowStyle , int columnIndex , Element cellElement , RowWriter rowWriter ) { String rawAssignedCellIndex = cellElement . attributeValue ( WorkbookAttribute . COLUMN . getValue ( ) ) ; String rawRowSpan = cellElement . attributeValue ( WorkbookAttribute . ROWSPAN . getValue ( ) ) ; String rawColumnSpan = cellElement . attributeValue ( WorkbookAttribute . COLSPAN . getValue ( ) ) ; String style = cellElement . attributeValue ( WorkbookAttribute . STYLE . getValue ( ) ) ; boolean quotePrefix = Boolean . valueOf ( cellElement . attributeValue ( WorkbookAttribute . QUOTE_PREFIXED . getValue ( ) ) ) ; int assignedColumnIndex = rawAssignedCellIndex == null ? columnIndex : StyleUtils . safeInteger ( rawAssignedCellIndex ) ; int rowSpan = StyleUtils . safeInteger ( rawRowSpan ) ; int columnSpan = StyleUtils . safeInteger ( rawColumnSpan ) ; CellWriter cellWriter = rowWriter . createCellWriter ( assignedColumnIndex ) ; cellWriter . setValue ( cellElement . getText ( ) . trim ( ) ) ; cellWriter . setQuotePrefix ( quotePrefix ) ; cellWriter . setRowColumnSpan ( rowIndex , assignedColumnIndex , rowSpan , columnSpan ) ; if ( CCSSValue . INHERIT . equals ( style ) && rowStyle != null ) cellWriter . setStyle ( rowStyle ) ; if ( style != null ) cellWriter . setStyle ( style ) ; }
Generating the cell of Excel and attaching the style of cell.
Generating the cell of Excel and attaching the style of cell .