easyexcel导出自定义样式及表头背景颜色
1.自定义样式.
public static void writeExcel(List<? extends Object> data, String sheetName,List<String> nameList, ByteArrayOutputStream bos,Class model){
// 头的策略
WriteCellStyle headWriteCellStyle = new WriteCellStyle();
//设置表头居中对齐
headWriteCellStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
// 颜色
headWriteCellStyle.setFillForegroundColor(IndexedColors.SEA_GREEN.getIndex());
//字体
WriteFont headWriteFont = new WriteFont();
headWriteFont.setFontHeightInPoints