首页 > 其他 > 详细

POI 中Cell的backgroundcolor和foregroundcolor

时间:2015-08-04 19:02:52      阅读:194      评论:0      收藏:0      [点我收藏+]

刚开始以为要获得cell的背景色是使用  getFillBackgroundColor()这个函数(这里返回的是调色板的索引,要获得RGB需要先获得系统的Pallete,然后在获得 RGB)。结果出来的索引都是一样的,搜索了好一会,发现都没有自己要的答案,想想自己估计又犯了什么低级错误了,这个问题应该不是什么问题。果然在 POI的文档里面,这个问题就已经陈述出来了:

public short getFillBackgroundColor()

Get the background fill color. Note - many cells are actually filled with a foreground fill, not a background fill - see getFillForegroundColor()

public short getFillForegroundColor()

Get the foreground fill color. Many cells are filled with this, instead of a background color (getFillBackgroundColor())


这里写到许多cell其实是使用前景来填充的,而不是背景填充,所以应该要用getFillForegroundColor这个函数。当然目前还不是很了解background fill 和foreground fill。


POI 中Cell的backgroundcolor和foregroundcolor

原文:http://www.cnblogs.com/toSeeMyDream/p/4702796.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!