I'm looking for a way to set the color of the background of an Excel worksheet using Java's Apache POI
Thanks!
I'm looking for a way to set the color of the background of an Excel worksheet using Java's Apache POI
Thanks!
Try XSSFSheet.setTabColor from the POI Documentation
Edited:
You may need to apply it to each cell / row style.
How to apply background color for the rows in excel sheet using Apache POI?
Another similar example/better explanation here:
HSSFCellStyle cellStyle = workBook.createCellStyle();
style.setFillForegroundColor(IndexedColors.GREY_50_PERCENT.getIndex());
style.setFillPattern(CellStyle.SOLID_FOREGROUND);
cell.setCellStyle(style);