Setting foreground color for HSSFCellStyle is always coming out black

I got this to work. I had to set the foreground color to make the background color work (??).

So I changed:

cellStyle.setFillBackgroundColor(HSSFColor.GREY_25_PERCENT.index);

to:

cellStyle.setFillForegroundColor(HSSFColor.GREY_25_PERCENT.index);

and it worked!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)