|
@@ -569,7 +569,13 @@ public class ZhcxPersistentManageServiceImpl extends ServiceImpl<ZhcxPersistentM
|
|
}
|
|
}
|
|
}
|
|
}
|
|
try {
|
|
try {
|
|
- worksheet.autoFitColumns();
|
|
|
|
|
|
+ AutoFitterOptions options = new AutoFitterOptions();
|
|
|
|
+ options.setAutoFitMergedCells(true); // 让合并单元格的列也自适应
|
|
|
|
+ options.setOnlyAuto(true); // 仅自动调整,不缩小
|
|
|
|
+ worksheet.autoFitColumns(options);
|
|
|
|
+ for (int i = 0; i <= worksheet.getCells().getMaxColumn(); i++) {
|
|
|
|
+ worksheet.getCells().setColumnWidth(i, worksheet.getCells().getColumnWidth(i) + 2);
|
|
|
|
+ }
|
|
worksheet.setName(year+"-"+month+"-顽症统计");
|
|
worksheet.setName(year+"-"+month+"-顽症统计");
|
|
response.addHeader("Pargam", "no-cache");
|
|
response.addHeader("Pargam", "no-cache");
|
|
response.addHeader("Cache-Control", "no-cache");
|
|
response.addHeader("Cache-Control", "no-cache");
|