|
|
@@ -190,7 +190,7 @@ public class NewExcelUtil<T> {
|
|
|
cell.setCellValue(sheetName);
|
|
|
CellRangeAddress region = new CellRangeAddress(0, 0, 0, fields.size()-1);
|
|
|
sheet.addMergedRegion(region);
|
|
|
- cell.setCellStyle(styles.get("header"));
|
|
|
+ cell.setCellStyle(styles.get("total"));
|
|
|
Row row = sheet.createRow(1);
|
|
|
int column = 0;
|
|
|
// 写入各个字段的列头名称
|
|
|
@@ -341,7 +341,7 @@ public class NewExcelUtil<T> {
|
|
|
style.cloneStyleFrom(styles.get("data"));
|
|
|
style.setAlignment(HorizontalAlignment.CENTER);
|
|
|
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
- style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
|
|
|
+ style.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
|
|
|
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
|
|
Font headerFont = wb.createFont();
|
|
|
headerFont.setFontName("Arial");
|
|
|
@@ -352,11 +352,15 @@ public class NewExcelUtil<T> {
|
|
|
styles.put("header", style);
|
|
|
|
|
|
style = wb.createCellStyle();
|
|
|
+ style.cloneStyleFrom(styles.get("data"));
|
|
|
style.setAlignment(HorizontalAlignment.CENTER);
|
|
|
style.setVerticalAlignment(VerticalAlignment.CENTER);
|
|
|
+ style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
|
|
|
+ style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
|
|
Font totalFont = wb.createFont();
|
|
|
totalFont.setFontName("Arial");
|
|
|
totalFont.setFontHeightInPoints((short) 10);
|
|
|
+ totalFont.setColor(IndexedColors.WHITE.getIndex());
|
|
|
style.setFont(totalFont);
|
|
|
styles.put("total", style);
|
|
|
|