How do we get background color
of a XSSFCell
. I tried using XSSFCellStyle
but no luck.
FileInputStream fis = new FileInputStream(fileName);
XSSFWorkbook book = new XSSFWorkbook(fis);
XSSFSheet sheet = book.getSheetAt(0);
XSSFRow row = sheet.getRow(0);
System.out.println(row.getCell(0).getCellStyle().getFillForegroundColor());
Using these steps I am not able to get background color representation in Short
type.