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

相关推荐
xzkyd outpaper1 小时前
Java中协变逆变的实现与Kotlin中的区别
java·kotlin
fuyongliang1231 小时前
Linux shell 脚本基础 003
java·服务器·前端
小蒜学长3 小时前
汽车专卖店管理系统的设计与实现(代码+数据库+LW)
java·数据库·spring boot·后端·汽车
lypzcgf3 小时前
Coze源码分析-工作空间-项目开发-前端源码
前端·人工智能·typescript·系统架构·开源软件·react·安全架构
yuguo.im3 小时前
Chrome DevTools Performance 是优化前端性能的瑞士军刀
前端·javascript·性能优化·chrome devtools
catcfm5 小时前
Java学习笔记-泛型
java·笔记·学习
FSHOW5 小时前
【独立开发日记】MQ端到端类型安全
前端·javascript·后端
老华带你飞5 小时前
社区互助|基于SSM+vue的社区互助平台的设计与实现(源码+数据库+文档)
java·前端·数据库·vue.js·小程序·毕设·社区互助平台
一支鱼6 小时前
前端使用次数最多的工具封装
前端·typescript·编程语言
GIS之路6 小时前
GDAL 简介
前端