I try to use Apache POI
to change background colors of cells in a row. I use following code to handle it in xls
file, but there aren't any changes in file after execution.
FileInputStream fis = new FileInputStream(src);
HSSFWorkbook wb = new HSSFWorkbook(fis);
r = sheet.getRow(5);
CellStyle style = wb.createCellStyle();
style.setFillForegroundColor(IndexedColors.RED.getIndex());
r.setRowStyle(style);