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

相关推荐
蒸蒸yyyyzwd3 小时前
cpp对象模型学习笔记1.1-2.8
java·笔记·学习
阿蒙Amon4 小时前
TypeScript学习-第7章:泛型(Generic)
javascript·学习·typescript
睡美人的小仙女1274 小时前
Threejs加载环境贴图报错Bad File Format: bad initial token
开发语言·javascript·redis
程序员徐师兄4 小时前
Windows JDK11 下载安装教程,适合新手
java·windows·jdk11 下载安装·jdk11 下载教程
fanruitian4 小时前
uniapp android开发 测试板本与发行版本
前端·javascript·uni-app
rayufo4 小时前
【工具】列出指定文件夹下所有的目录和文件
开发语言·前端·python
RANCE_atttackkk4 小时前
[Java]实现使用邮箱找回密码的功能
java·开发语言·前端·spring boot·intellij-idea·idea
摘星编程5 小时前
React Native + OpenHarmony:Timeline垂直时间轴
javascript·react native·react.js
五岳5 小时前
DTS按业务场景批量迁移阿里云MySQL表实战(下):迁移管理平台设计与实现
java·应用·dts
zhougl9965 小时前
Java 所有关键字及规范分类
java·开发语言