垡头网站建设,网站系统分析的步骤有哪些,网站5建设需要学什么,河北住房建设厅官方网站接到的需求是在模板表格的指定位置再插入表格。比如在模板的${proTable}处插入表格。依赖的包org.apache.poi poi 3.15org.apache.poi poi-ooxml 3.15插入表格由于是在表格里的指定地方插入表格#xff0c;所以要遍历表格的每个单元格#xff0c;查找到要插入点的占位符。// …接到的需求是在模板表格的指定位置再插入表格。比如在模板的${proTable}处插入表格。依赖的包org.apache.poi poi 3.15org.apache.poi poi-ooxml 3.15插入表格由于是在表格里的指定地方插入表格所以要遍历表格的每个单元格查找到要插入点的占位符。// 处理表 public CustomXWPFDocument generateCoopApplyWord(Map param, String template) { CustomXWPFDocument doc null; try { OPCPackage pack POIXMLDocument.openPackage(template); doc new CustomXWPFDocument(pack); if (param ! null param.size() 0) { //处理表格 Iterator it doc.getTablesIterator(); while (it.hasNext()) { XWPFTable table it.next(); List rows table.getRows(); for (XWPFTableRow row : rows) { List cells row.getTableCells(); for (XWPFTableCell cell : cells) { List paragraphListTable cell.getParagraphs(); insertTable(${proTable}