changing the color of excel font poi
changing the color of excel font poi:
Apache poi is used to create the excel sheet in java and it provides lot of features such as autosize to column or header or contents etc…
Along with those options you can change the font color in the excel using apache poi in java,
[java]
HSSFFont font = wb.createFont();
HSSFCellStyle style = wb.createCellStyle();
style.setFont(font);
font = wb.createFont();
font.setColor(HSSFColor.WHITE.index);
style = wb.createCellStyle();
style.setFont(font);
[/java]
Now the font color will be changed to white from black. Using apache poi you can also change background color, font family, autosize, setcolumnwidth etc…