POI setting Cell Background to a Custom Color

后端 未结 6 866
野性不改
野性不改 2020-12-25 11:03

I want to set custom color to a cell\'s background.
I use HSSFWorkbook (can\'t use anything else).

HSSFPalette palette = aWorkBook.getCustom         


        
6条回答
  •  清酒与你
    2020-12-25 11:34

    Don't forget to call this.

    style.setFillPattern(CellStyle.Align_Fill);
    

    Parameter may differ according to your need. Maybe CellStyle.FINE_DOTS or so.

提交回复
热议问题