I have the following code:
XSSFFont font = createFont(workBook);
font.setColor(IndexedColors.WHITE.getIndex());
font.setFontName("Arial");
font.setBold(true);
XSSFColor BLUE_WAVE = new XSSFColor(new byte[]{ (byte) 60,
(byte) 120,
(byte) 216 },
new DefaultIndexedColorMap());
CellStyle style = workBook.createCellStyle();
style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
style.setFillForegroundColor(BLUE_WAVE);
style.setFont(createHeaderFont(workBook));
XSSFCell cell = row.createCell(cellIndex);
cell.setCellType(cellType);
cell.setCellStyle(style);
// ...
// Popuplation of cells goes here
// ...
As illustrated above, the cells have a style. I am not using any fancy fonts. My code generates an .xlsx
file successfully without any errors. When I try opening it using WPS office (under Ubuntu), it shows the following warning (and then loads the file normally):
There are no formulas in the xlsx
file.
I have the following Gradle dependencies:
implementation("org.apache.poi:poi:5.2.3")
implementation("org.apache.poi:poi-ooxml:5.2.3")
I'm not sure how to debug and fix this. I don't want it to be showing any warnings in WPS or any other office application. Any ideas would be highly appreciated!