Get Cells background palette color in an xssfworkbook using Apache POI

Get Cells background palette color in an XSSFWorkbook using Apache POI

Fixing xssf currentCell.getCellStyle().getFillForegroundColor() always returning 64

import org.apache.poi.ss.usermodel.*;
import org.apache.poi.xssf.usermodel.XSSFColor;
//...rest of your code
((XSSFColor)currentCell.getCellStyle().getFillForegroundColorColor()).getARGBHex()
//or
((XSSFColor)currentCell.getCellStyle().getFillForegroundColorColor()).getRGB()
//...rest of your code