| | |
| | | OutputStream os = new FileOutputStream("C:\\Users\\大头\\Desktop\\MAQ组别报告\\林_PAQ_IA_CN2.docx"); |
| | | XWPFDocument document = new XWPFDocument(POIXMLDocument.openPackage("C:\\Users\\大头\\Desktop\\MAQ组别报告\\终稿【0607中文版】MAQ组别对比报告.docx")); |
| | | |
| | | String fileName = "C:\\Users\\大头\\Desktop\\MAQ组别报告\\组别对比报告测试数据.xlsx"; |
| | | String fileName = "C:\\Users\\大头\\Desktop\\MAQ组别报告\\MAQ组别导入数据模板 (2).xlsx"; |
| | | //变更图表数据 |
| | | changeMAQTRChart(document,fileName); |
| | | document.write(os); |
| | |
| | | //行 |
| | | for (int j = 1; j <= sheet.getLastRowNum(); j++) { |
| | | XSSFRow row = sheet.getRow(j); |
| | | if(row == null){ |
| | | continue; |
| | | } |
| | | //列 |
| | | for (int k = 1; k < row.getLastCellNum(); k++) { |
| | | XSSFCell cell = row.getCell(k); |
| | | if(cell == null){ |
| | | continue; |
| | | } |
| | | /* |
| | | if (CellType.NUMERIC == cell.getCellType()) { |
| | | System.out.println(cell.getNumericCellValue()); |
| | |
| | | System.out.println(cell.getStringCellValue()); |
| | | } |
| | | */ |
| | | switch (cell.getCellType()) { |
| | | case STRING: |
| | | continue; |
| | | } |
| | | //table1 多个答题结果处理 |
| | | if(map.get(k) != null){ |
| | | map.get(k).add(cell.getNumericCellValue()); |