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

相关推荐
闲人编程1 分钟前
Python的导入系统:模块查找、加载和缓存机制
java·python·缓存·加载器·codecapsule·查找器
weixin_411191842 分钟前
flutter中WebView的使用及JavaScript桥接的问题记录
javascript·flutter
HIT_Weston7 分钟前
39、【Ubuntu】【远程开发】拉出内网 Web 服务:构建静态网页(二)
linux·前端·ubuntu
百***06017 分钟前
SpringMVC 请求参数接收
前端·javascript·算法
故渊ZY18 分钟前
Java 代理模式:从原理到实战的全方位解析
java·开发语言·架构
匿者 衍20 分钟前
POI读取 excel 嵌入式图片(支持wps 和 office)
java·excel
天外天-亮23 分钟前
Vue + excel下载 + 水印
前端·vue.js·excel
起个名字逛街玩25 分钟前
前端正在走向“工程系统化”:从页面开发到复杂产品架构的深度进化
前端·架构
一个尚在学习的计算机小白29 分钟前
java集合
java·开发语言
IUGEI37 分钟前
synchronized的工作机制是怎样的?深入解析synchronized底层原理
java·开发语言·后端·c#