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

相关推荐
PBitW几秒前
为什么vite中TS报错,可以继续运行?Webpack不行?💡
前端·typescript
GISer_Jing10 分钟前
一套H5跑通三端:App+小程序内嵌H5跨端适配全栈解决方案
前端·前端框架·ai编程
码云之上21 分钟前
项目团队从 5 人扩到 15 人,我写了个 CLI 让 IDE 共享 AI 规则
前端·人工智能·后端
飞天狗25 分钟前
LCP / INP / CLS 三个维度的实战调优:把 Web Vitals 从不及格拉到优秀的完整路径
前端·性能优化
用户2986985301429 分钟前
前端 Excel 处理进阶:React 中合并与取消合并单元格的实现
前端·javascript·react.js
触底反弹36 分钟前
面试被问 RAG 只能说出六个字?这篇用 100 行 Node.js 代码帮你彻底搞懂
javascript·人工智能·面试
Highcharts37 分钟前
@highcharts/react完整技术指南|新版Highcharts React使用、迁移、SSR、TS 优化全解
前端·javascript
浩瀚地学40 分钟前
【Java基础复习】IO流(二)
java·开发语言·经验分享·笔记·学习
hdsoft_huge43 分钟前
SpringBoot系列06:RESTful接口开发,请求参数接收、全局跨域CORS完整配置
java·spring boot
IVVi0jToe1 小时前
高效C++线程池设计与实现
java·c++·安全