/** * Remove table references and relations * @param t table to remove */ public void removeTable(XSSFTable t) { long id = t.getCTTable().getId(); Map.Entry<String, XSSFTable> toDelete = null; for (Map.Entry<String, XSSFTable> entry : tables.entrySet()) { if (entry.getValue().getCTTable().getId() == id) toDelete = entry; } if (toDelete != null) { removeRelation(getRelationById(toDelete.getKey()), true); tables.remove(toDelete.getKey()); toDelete.getValue().onTableDelete(); } }
/** * Remove table references and relations * @param t table to remove */ public void removeTable(XSSFTable t) { long id = t.getCTTable().getId(); Map.Entry<String, XSSFTable> toDelete = null; for (Map.Entry<String, XSSFTable> entry : tables.entrySet()) { if (entry.getValue().getCTTable().getId() == id) toDelete = entry; } if (toDelete != null) { removeRelation(getRelationById(toDelete.getKey()), true); tables.remove(toDelete.getKey()); toDelete.getValue().onTableDelete(); } }
@Override public void process(XLXContext context) throws Exception { PdfContext pdfContext = (PdfContext) context; int tableId = (int) getTable().getCTTable().getId(); pdfContext.setTableId(tableId); context.getTableStylesMap().put(tableId, extractTableStyleName()); super.process(context); context.setTableId(XLXContext.NOT_A_TABLE); } }
@Override public void process(XLXContext context) throws Exception { context.write("<tr><td>\n<table>\n"); int tableId = (int) getTable().getCTTable().getId(); context.setTableId(tableId); context.setTableStart(getTable().getStartCellReference().getRow()); context.getTableStylesMap().put(tableId, extractTableStyleName()); super.process(context); context.setTableId(XLXContext.NOT_A_TABLE); context.write("\n</table>\n</td></tr>\n"); } }