利用poi设置背景颜色时,应如下配置,

CellStyle cell=workbook.createCellStyle();
cell.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
cell.setFillPattern(FillPatternType.SOLID_FOREGROUND);

而下是下方的set方法

cell.setFillBackgroundColor(IndexedColors.GREY_25_PERCENT.getIndex());

下面是颜色相关参数,可供参考 

cell设置背景颜色为啥不起作用

cell设置背景颜色为啥不起作用

 

  

相关文章:

  • 2021-12-21
  • 2021-08-05
  • 2021-12-12
  • 2021-11-04
  • 2022-01-14
  • 2021-12-27
猜你喜欢
  • 2022-01-21
  • 2022-12-23
  • 2021-11-23
  • 2021-06-19
  • 2021-05-18
  • 2021-04-21
  • 2021-09-19
相关资源
相似解决方案