Commit c9f9afe8f7476d4e0d68804f66530111418ffa92
1 parent
885e49d770
Exists in
master
and in
6 other branches
婚检导出
Showing 1 changed file with 4 additions and 2 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/ExcelUtil.java
View file @
c9f9afe
| ... | ... | @@ -662,6 +662,7 @@ |
| 662 | 662 | WritableFont wf = new WritableFont(WritableFont.ARIAL, 12, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); |
| 663 | 663 | WritableCellFormat wcf = new WritableCellFormat(wf); |
| 664 | 664 | wcf.setAlignment(jxl.format.Alignment.CENTRE);//水平居中 |
| 665 | + wcf.setVerticalAlignment(VerticalAlignment.CENTRE);//垂直居中 | |
| 665 | 666 | ws.setRowView(0, 300); // 设置指定行高 |
| 666 | 667 | // 设置列宽 |
| 667 | 668 | for (int j = 0; j < 15; j++) |
| 668 | 669 | |
| ... | ... | @@ -747,11 +748,12 @@ |
| 747 | 748 | WritableFont wf = new WritableFont(WritableFont.ARIAL, 12, WritableFont.BOLD, false, UnderlineStyle.NO_UNDERLINE, Colour.BLACK); |
| 748 | 749 | WritableCellFormat wcf = new WritableCellFormat(wf); |
| 749 | 750 | wcf.setAlignment(jxl.format.Alignment.CENTRE);//水平居中 |
| 751 | + wcf.setVerticalAlignment(VerticalAlignment.CENTRE);//垂直居中 | |
| 750 | 752 | ws.setRowView(0, 300); // 设置指定行高 |
| 751 | 753 | // 设置列宽 |
| 752 | 754 | for (int j = 0; j < 31; j++) |
| 753 | 755 | { |
| 754 | - ws.setColumnView(j, 15); | |
| 756 | + ws.setColumnView(j, 7); | |
| 755 | 757 | } |
| 756 | 758 | //创建Excel标题格式 |
| 757 | 759 | ws.mergeCells(0, 0, 0, 3); |
| ... | ... | @@ -763,7 +765,7 @@ |
| 763 | 765 | ws.mergeCells(2, 1, 2, 3); |
| 764 | 766 | ws.addCell(new Label(2, 1, "女", wcf)); |
| 765 | 767 | ws.mergeCells(3, 0, 4, 0); |
| 766 | - ws.addCell(new Label(0, 0, "婚前医学检查人数", wcf)); | |
| 768 | + ws.addCell(new Label(3, 0, "婚前医学检查人数", wcf)); | |
| 767 | 769 | ws.mergeCells(3, 1, 3, 3); |
| 768 | 770 | ws.addCell(new Label(3, 1, "男", wcf)); |
| 769 | 771 | ws.mergeCells(4, 1, 4, 3); |