| | |
| | | if(tableEnum == TableEnum.table4){ |
| | | if(tableNum != null && tableNum != 8){ |
| | | for (int i = tableNum; i <= tableNum + 4; i++) { |
| | | if(i+2 > table.getRows().size()){ |
| | | continue; |
| | | } |
| | | XWPFTableRow row = table.getRows().get(i+2); |
| | | List<XWPFTableCell> cells = row.getTableCells(); |
| | | changeText(cells.get(0).getParagraphs().get(0),"#"+(i+1)+"."); |
| | |
| | | if(StringUtils.contains(keyValue, "%table-line-feed%")){ |
| | | String[] keyValues = keyValue.split("%table-line-feed%"); |
| | | runValue = delDynList(keyTemp, Arrays.asList(keyValues), paragraph, document,1); |
| | | }else{ |
| | | }else if(StringUtils.contains(keyValue, "%line-feed%")){ |
| | | String[] keyValues = keyValue.split("%line-feed%"); |
| | | runValue = delDynList(keyTemp, Arrays.asList(keyValues), paragraph, document,0); |
| | | } |
| | |
| | | |
| | | String key = "%" + textSet.getKey() + "%"; |
| | | if (text.indexOf(key) != -1) { |
| | | text = text.replaceAll(key, (String) textMap.get(textSet.getKey())); |
| | | text = text.replaceAll(key, String.valueOf(textMap.get(textSet.getKey()))); |
| | | repText = text; |
| | | if (checkText(text)) { |
| | | continue; |
| | |
| | | |
| | | //更改表格的值 |
| | | textMap.put("sendEmailFileName", "JAQ"); |
| | | textMap.put("SelectUsers",8); |
| | | //changeTable(document, textMap); |
| | | |
| | | |
| | | changeText(document, textMap); |
| | | changeTextBox(document, textMap); |
| | | addTableValue(document, null); |
| | | changeTable(document, textMap); |
| | | //changChart(textMap, document, reportType, dataPath); |
| | | |
| | | //建立文件对象 |
| | | File file = new File("C:\\Users\\Administrator\\Desktop\\JAQ中文版1.docx"); |