POI setting Cell Background to a Custom Color
You get this error because pallete is full. What you need to do is override preset color. Here is an example of function I’m using: public HSSFColor setColor(HSSFWorkbook workbook, byte r,byte g, byte b){ HSSFPalette palette = workbook.getCustomPalette(); HSSFColor hssfColor = null; try { hssfColor= palette.findColor(r, g, b); if (hssfColor == null ){ palette.setColorAtIndex(HSSFColor.LAVENDER.index, r, … Read more