I'm trying to format the cell background color based on the Testcase Execution status like if the test case got passed then the cell background should become Green and text color should be White.
Similarly for Failed test cases cell background color : Red and Text color : White
For that I tried the following script.
Background:
HSSFCellStyle style = wBook.createCellStyle()
style.setFillBackgroundColor(IndexedColors.GREEN.getIndex())
Foreground:
HSSFFont font = wBook.createFont()
font.setColor(HSSFColor.WHITE.index)
style.setFont(font)
resultCell.setCellStyle(style)
But after executing the test cases, cell background is not applying where as foreground only applies.
FYI: I'm Working with Excel version .XLS
Anyone give the correct method to apply background of the cell?
Thanks