ctTable.setRef(ref); if (ctTable.isSetAutoFilter()) { ctTable.getAutoFilter().setRef(ref);
ctTable.setRef(ref); if (ctTable.isSetAutoFilter()) { String filterRef;
ctTable.setRef(ref); if (ctTable.isSetAutoFilter()) { ctTable.getAutoFilter().setRef(ref);
cttable.setRef(my_data_range.formatAsString()); cttable.setDisplayName("MYTABLE"); /* this is the display name of the table */ cttable.setName("Test"); /* This maps to "displayName" attribute in <table>, OOXML */
ctTable.setRef("A1:H" + (sheet.getLastRowNum() + 1)); // adjust reference as needed
ctTable.setRef(ref); if (ctTable.isSetAutoFilter()) { String filterRef;
public void processTable(XLXContext context, String tableStartRef) { int col = table.getEndCellReference().getCol(); long currentRow = context.getCurrentRow() - 1; int totalsRowCount = (int) table.getCTTable().getTotalsRowCount(); CTAutoFilter filter = table.getCTTable().getAutoFilter(); if(filter != null){ String autoFilterRef = new CellReference((int) (currentRow - totalsRowCount),col).formatAsString(); table.getCTTable().getAutoFilter().setRef(tableStartRef + ":" + autoFilterRef); } String tableEndRef = new CellReference((int)currentRow,col).formatAsString(); table.getCTTable().setRef(tableStartRef + ":" + tableEndRef); context.processTable(table); }
CTTable cttable = table.getCTTable(); table.setDisplayName("table"); cttable.setRef("A1:C4"); cttable.setId(1);
cttable.setRef(reference.formatAsString());