I'm attempting to make the backdrop of Excel files white in one row and aqua in the other. However, no matter what I try, for some reason, the colour always turns black.
private void writeTable(Table table, Row row, CellStyle style){
if(row.getRowNum() % 2 == 0) {
style.setFillBackgroundColor(IndexedColors.AQUA.getIndex());
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
}
style.setWrapText(true);
Cell cell = row.createCell(0);
cell.setCellValue(table.index);
cell.setCellStyle(style);
//And it continues with other cells
}
It doesn't change whatever I do, even if I try GREY_25_PERCENT it's completely black. Here's a picture of my excel file