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 对应的颜色值】

相关推荐
王闯写bug6 小时前
tomcat老版本下载tomcat8.5下载
java·tomcat
凤山老林6 小时前
Spring Boot DDD 分层架构落地:领域模型、聚合根与事件驱动的业务实战
java·spring boot·架构
自强的小白6 小时前
MYbatis-plus(自定义sql)
java·sql·mybatis
古法安卓6 小时前
Android-Ext4文件系统问题排查
android·java·android studio
Escalating_xu6 小时前
【C 语言】深入理解指针(3):字符指针、数组指针、二维数组传参、函数指针与转移表
java·c语言·开发语言
sycmancia6 小时前
Qml——Window元素使用
前端
每天都好困6 小时前
03 AR 投影与误差修正:把地图上的点贴到视频画面上
前端
每天都好困6 小时前
04 地图图层封装:像管理 Photoshop 图层一样管理地图元素
前端
不正经的码狗6 小时前
Java 开发环境搭建与 Eclipse 使用速通教程
java·开发语言·eclipse
用户8181870627466 小时前
第37章 Java应用在K8s里的经典坑:容器内存/CPU limit与JVM参数不匹配导致的OOMKilled
java·后端