https://bz.apache.org/bugzilla/show_bug.cgi?id=62492

            Bug ID: 62492
           Summary: XSSFFontFormatting.setFontColor
                    IndexOutOfBoundsException
           Product: POI
           Version: 3.17-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: martin19942...@gmail.com
  Target Milestone: ---

I am trying to set the font of a conditional formatting However when I run

FontFormatting font1 = rule1.createFontFormatting();
font1.setFontColor(new XSSFColor(new java.awt.Color(198, 239, 206)));

I get an IndexOutOfBoundsException Shown below.

Exception in thread "main" java.lang.IndexOutOfBoundsException 
at
org.openxmlformats.schemas.spreadsheetml.x2006.main.impl.CTFontImpl.setColorArray(Unknown
Source)
at
org.apache.poi.xssf.usermodel.XSSFFontFormatting.setFontColor(XSSFFontFormatting.java:125)

The code that breaks is 
    @Override
    public void setFontColor(Color color) {
        XSSFColor xcolor = XSSFColor.toXSSFColor(color);
        if (xcolor == null) {
            _font.getColorList().clear();
        } else {
            _font.setColorArray(0, xcolor.getCTColor());
        }
    }



This stack overflow post is the only place I can find the issue mentioned,
however I dont beleive they ever submitted a bug report
https://stackoverflow.com/questions/45611870/can-not-set-font-color-in-conditional-formatting-cell-via-apache-poi

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to