/** * Get the name of the column, which is is unique per table. * * @return the column name * @since 4.0.0 */ public String getName() { return ctTableColumn.getName(); }
@Deprecated @Removal(version="4.2") public XSSFXmlColumnPr(XSSFTable table, CTTableColumn ctTableColum, CTXmlColumnPr ctXmlColumnPr) { this.table = table; this.tableColumn = table.getColumns().get(table.findColumnIndex(ctTableColum.getName())); this.ctXmlColumnPr = ctXmlColumnPr; }
/** * Get the name of the column, which is is unique per table. * * @return the column name * @since 4.0.0 */ public String getName() { return ctTableColumn.getName(); }
@Deprecated @Removal(version="4.2") public XSSFXmlColumnPr(XSSFTable table, CTTableColumn ctTableColum, CTXmlColumnPr ctXmlColumnPr) { this.table = table; this.tableColumn = table.getColumns().get(table.findColumnIndex(ctTableColum.getName())); this.ctXmlColumnPr = ctXmlColumnPr; }
private void wrapColumns(Table table) { CTTable ctTable = table.getCTTable(); for (CTTableColumn column : ctTable.getTableColumns().getTableColumnArray()) { column.setName(WrappingUtil.wrapTableColumnName(column.getName())); } }
@Override public void process(XLXContext context) throws Exception { CTTableColumns cols = getTable().getCTTable().getTableColumns(); int index = 0; List<Node> cells = getForEach().getChildren().get(0).getChildren(); int offset = getTable().getStartCellReference().getCol(); for(CTTableColumn col : cols.getTableColumnArray()){ String element = SST.toXMLEment( col.getName()); ((XMLCellNode) cells.get(index + offset)).setElement(element); index++; } context.write("<root>\n"); getForEach().process(context); context.write("</root>"); }
@Override public void process(XLXContext context) throws Exception { String style = context.getReportContext().getTableStyleName(); if(style != null){ table.getCTTable().getTableStyleInfo().setName(style); } for(CTTableColumn c : table.getCTTable().getTableColumns().getTableColumnArray()){ Object name = CellExpressionParser.parseExpression(c.getName()).evaluate(context); if(name != null){ c.setName(name.toString()); } } if(header != null){ context.setTableStartHeader(); header.process(context); context.endTableHeader(); generateXMLMap(context); } String tableStartRef = startTable(context); long row = context.getCurrentRow(); forEach.process(context); if(row == context.getCurrentRow()){ context.nextRow();//insert empty row } if(totals != null){ totals.process(context); } processTable(context, tableStartRef); }