EasyExcel 注解fillForegroundColor

EasyExcel 注解fillForegroundColor 对应的颜色值

/**

* 样式的数据类

*

* @author leiyiDong

**/

@Data

// 头背景设置成红色 IndexedColors.RED.getIndex()

@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 10)

// 头字体设置成20

@HeadFontStyle(fontHeightInPoints = 20)

// 内容的背景设置成绿色 IndexedColors.GREEN.getIndex()

@ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 17)

// 内容字体设置成20

@ContentFontStyle(fontHeightInPoints = 20)

public class DemoStyleData {

// 字符串的头背景设置成粉红 IndexedColors.PINK.getIndex()

@HeadStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 14)

// 字符串的头字体设置成20

@HeadFontStyle(fontHeightInPoints = 30)

// 字符串的内容的背景设置成天蓝 IndexedColors.SKY_BLUE.getIndex()

@ContentStyle(fillPatternType = FillPatternType.SOLID_FOREGROUND, fillForegroundColor = 40)

// 字符串的内容字体设置成20

@ContentFontStyle(fontHeightInPoints = 30)

@ExcelProperty("字符串标题")

private String string;

@ExcelProperty("日期标题")

private Date date;

@ExcelProperty("数字标题")

private Double doubleData;

}

fillForegroundColor 对应的颜色值如下图:

easy-excel

【参考:EasyExcel 注解fillForegroundColor 对应的颜色值】

相关推荐
笃行客从不躺平几秒前
线程池原理复习
java·开发语言
weixin_448771725 分钟前
SpringMVC执行流程源码分析之二
java
A尘埃10 分钟前
大模型应用python+Java后端+Vue前端的整合
java·前端·python
皮皮林55144 分钟前
MinIO 不再“开放”,RustFS 能否成为更优选择?
java
遥遥晚风点点1 小时前
Spark导出数据文件到HDFS
前端·javascript·ajax
多喝开水少熬夜1 小时前
树与图的深度和广度优先遍历-java实现邻接表存储
java·深度优先·宽度优先
潲爺1 小时前
Java IDEA学习之路:第九周课程笔记归纳
java·学习·intellij-idea
克里斯蒂亚L1 小时前
开发一个计时器组件
前端·浏览器
化作星辰1 小时前
java 给鉴权kafka2.7(sasl)发送消息权限异常处理
java·大数据·开发语言·kafka
克里斯蒂亚诺更新1 小时前
微信小程序 点击某个marker改变其大小
开发语言·前端·javascript