/** * @return the table style name, if set * @since 3.17 beta 1 */ public String getStyleName() { if (styleName == null && ctTable.isSetTableStyleInfo()) { setStyleName(ctTable.getTableStyleInfo().getName()); } return styleName; }
/** * Changes the name of the Table * @param newStyleName The name of the style. * @since 3.17 beta 1 */ public void setStyleName(String newStyleName) { if (newStyleName == null) { if (ctTable.isSetTableStyleInfo()) { ctTable.getTableStyleInfo().unsetName(); } styleName = null; return; } if (! ctTable.isSetTableStyleInfo()) { ctTable.addNewTableStyleInfo(); } ctTable.getTableStyleInfo().setName(newStyleName); styleName = newStyleName; }
/** * @since 3.17 beta 1 */ public TableStyleInfo getStyle() { if (! ctTable.isSetTableStyleInfo()) return null; return new XSSFTableStyleInfo(((XSSFSheet) getParent()).getWorkbook().getStylesSource(), ctTable.getTableStyleInfo()); }
/** * @return the table style name, if set * @since 3.17 beta 1 */ public String getStyleName() { if (styleName == null && ctTable.isSetTableStyleInfo()) { setStyleName(ctTable.getTableStyleInfo().getName()); } return styleName; }
/** * Changes the name of the Table * @param newStyleName The name of the style. * @since 3.17 beta 1 */ public void setStyleName(String newStyleName) { if (newStyleName == null) { if (ctTable.isSetTableStyleInfo()) { ctTable.getTableStyleInfo().unsetName(); } styleName = null; return; } if (! ctTable.isSetTableStyleInfo()) { ctTable.addNewTableStyleInfo(); } ctTable.getTableStyleInfo().setName(newStyleName); styleName = newStyleName; }
/** * @since 3.17 beta 1 */ public TableStyleInfo getStyle() { if (! ctTable.isSetTableStyleInfo()) return null; return new XSSFTableStyleInfo(((XSSFSheet) getParent()).getWorkbook().getStylesSource(), ctTable.getTableStyleInfo()); }
table.getCTTable().getTableStyleInfo().setName("TableStyleMedium2");
@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); }