|
@@ -231,7 +231,7 @@ public class ExcelHelper {
|
|
|
}
|
|
|
rowIndex = writeColspanTitlesToExcel(wb, sheet, data.getColspanTitles(), data.getTitles());
|
|
|
writeRowsToExcel(wb, sheet, data.getRows(), rowIndex, data.getStyleList());
|
|
|
- //autoSizeColumns(sheet, data.getTitles().size() + 1);
|
|
|
+ autoSizeColumns(sheet, data.getTitles().size() + 1);
|
|
|
|
|
|
//合并行
|
|
|
if (data.getCellRangeList() != null && data.getCellRangeList().size() > 0) {
|
|
@@ -332,8 +332,8 @@ public class ExcelHelper {
|
|
|
dataFont.setColor(IndexedColors.BLACK.index);
|
|
|
|
|
|
XSSFCellStyle defaultStyle = wb.createCellStyle();
|
|
|
- //dataStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
|
- //dataStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
+ defaultStyle.setAlignment(HorizontalAlignment.CENTER);
|
|
|
+ defaultStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
defaultStyle.setFont(dataFont);
|
|
|
setBorder(defaultStyle, BorderStyle.THIN, new XSSFColor(new java.awt.Color(188, 188, 188), new DefaultIndexedColorMap()));
|
|
|
|