| | |
| | | */ |
| | | public void exportExcelManySheet(HttpServletResponse response, List<ExcelExp> list, boolean includeQrCode, byte[] bt, |
| | | List<String> sigArr, List<String> arrAn, String inquiryNumber, String caseTitle) throws IOException { |
| | | // response.setContentType("application/vnd.ms-excel"); |
| | | // response.setCharacterEncoding("utf-8"); |
| | | // response.setContentType("application/vnd.ms-excel"); |
| | | // response.setCharacterEncoding("utf-8"); |
| | | |
| | | try { |
| | | createWorkbook(); |
| | |
| | | |
| | | |
| | | // 创建行并设置高度 |
| | | row = sheet.createRow(firow); |
| | | row = sheet.createRow(firow); |
| | | row.setHeight((short)(40 * 40)); |
| | | //生成二维码 |
| | | if(includeQrCode) |
| | |
| | | firow = firow + 1; |
| | | row = sheet.createRow(firow); |
| | | } |
| | | // sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 7)); |
| | | // sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 7)); |
| | | if(firow==1) |
| | | { |
| | | sheet.addMergedRegion(new CellRangeAddress(firow, firow, 0, 8)); |
| | |
| | | titleCell.setCellStyle(style); |
| | | firow = firow + 1; |
| | | row = sheet.createRow(firow); |
| | | // |
| | | // |
| | | row.createCell(0).setCellValue("发文号:"); |
| | | sheet.addMergedRegion(new CellRangeAddress(firow, firow, 1, 3)); |
| | | row.createCell(1).setCellValue(inquiryNumber); |
| | |
| | | column = 0; |
| | | } else { |
| | | // 普通sheet处理 |
| | | // recordId = (DocumentMaterialsVo)list.get(0) |
| | | // recordId = (DocumentMaterialsVo)list.get(0) |
| | | row = sheet.createRow(0); |
| | | column = 0; |
| | | } |
| | |
| | | String key = StringUtils.format("header_{}_{}", excel.headerColor(), excel.headerBackgroundColor()); |
| | | if (!headerStyles.containsKey(key)) |
| | | { |
| | | style = wb.createCellStyle(); |
| | | style = wb.createCellStyle(); |
| | | style.cloneStyleFrom(styles.get("data")); |
| | | style.setAlignment(HorizontalAlignment.CENTER); |
| | | style.setVerticalAlignment(VerticalAlignment.CENTER); |
| | |
| | | } |
| | | return val; |
| | | } |
| | | } |
| | | } |