Commit ace6e061 authored by 高滢's avatar 高滢

导出方案

parent 56106ce8
......@@ -168,7 +168,7 @@ public class TestPlanRecordController extends BaseController{
}
});
ExcelMultipleSheetsUtil.excelMultipleSheets(result, "导出方案" + DateUtil.format(new Date(), "yyyyMMddHHmmss"), XLSX_SUFFIX, respon);
ExcelMultipleSheetsUtil.excelMultipleSheets(result, "导出方案" + DateUtil.format(new Date(), "yyyyMMdd"), XLSX_SUFFIX, respon);
}
}
......@@ -100,7 +100,11 @@ public class ExcelMultipleSheetsUtil {
private static void createHeaderRow(Sheet sheet, Class<?> clazz) {
// 创建单元格样式
CellStyle headerCellStyle = createCellStyle(sheet.getWorkbook());
headerCellStyle.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
// 填充效果(全景填充)
headerCellStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
headerCellStyle.setAlignment(HorizontalAlignment.CENTER);
headerCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
// 创建标题行
Row headerRow = sheet.createRow(0);
Field[] fields = clazz.getDeclaredFields();
......@@ -150,7 +154,6 @@ public class ExcelMultipleSheetsUtil {
cellStyle.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
cellStyle.setBorderRight(BorderStyle.THIN);
cellStyle.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
// 设置字体
Font dataFont = workbook.createFont();
dataFont.setFontName("Arial");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment