I read all questions on so but no answer was working. If i change the cell color in excel i still get 0 and 64. I am using excel 2007 and poi 3.11. Thanks for help.
try{ File file = new File("C:\\Test\\poi.xlsx");
FileInputStream fis = new FileInputStream(file);
XSSFWorkbook wb = new XSSFWorkbook(fis);
XSSFSheet sh = wb.getSheet("Tabelle1");
XSSFCellStyle cs = sh.getRow(0).getCell(0).getCellStyle();
System.out.println("Color: "+cs.getFillForegroundColor()); // 0
System.out.println("Color: "+cs.getFillBackgroundColor()); // 64
}catch(Exception e){e.printStackTrace();}