I'm having a little problem setting custom font color for XSSFWorkbook from Apache POI . When I do this:
yellow = workbook.createCellStyle(); Font whiteFont = workbook.createFont(); whiteFont.setColor(new XSSFColor(new Color(255, 255, 255)).getIndexed()); yellow.setFillForegroundColor(new XSSFColor(yellowRGB)); yellow.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND); yellow.setFont(whiteFont);
The font remains black; I'm not sure what I'm doing wrong though.
java apache-poi
silverAndroid
source share