springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActReserveApi.java
@@ -599,7 +599,7 @@ headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); //设置头字体 WriteFont headWriteFont = new WriteFont(); headWriteFont.setFontHeightInPoints((short)6); headWriteFont.setFontHeightInPoints((short)5); headWriteFont.setBold(true); headWriteCellStyle.setWriteFont(headWriteFont); @@ -607,7 +607,7 @@ WriteCellStyle contentWriteCellStyle = new WriteCellStyle(); //设置表格内容字体 WriteFont writeFont = new WriteFont(); writeFont.setFontHeightInPoints((short)6); writeFont.setFontHeightInPoints((short)5); //设置 水平居中 contentWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER); //设置 垂直居中 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/excel/Custemhandler.java
@@ -33,8 +33,8 @@ Integer columnWidth = this.dataLength(cellDataList, cell, isHead); if (columnWidth >= 0) { if (columnWidth > 25) { columnWidth = 25; if (columnWidth > 20) { columnWidth = 20; } Integer maxColumnWidth = (Integer)((Map)maxColumnWidthMap).get(cell.getColumnIndex()); @@ -42,6 +42,9 @@ ((Map)maxColumnWidthMap).put(cell.getColumnIndex(), columnWidth); writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(), columnWidth * 75); } if(cell.getStringCellValue().equals("有无")){ writeSheetHolder.getSheet().setColumnWidth(cell.getColumnIndex(),30*75); } } }