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

            Bug ID: 57768
           Summary: CellStyle.cloneStyleFrom(...) does not copying
                    background colors and borders
           Product: POI
           Version: 3.11-FINAL
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 32615
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32615&action=edit
Java code, excel template file, screenshots

Method cloneStyleFrom(CellStyle cellStyle) does not copy all styles. For
example: background color, borders.
If trying to copy background color after calling this method, getting
Exception:
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at org.apache.poi.xssf.model.StylesTable.getFillAt(StylesTable.java:269)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.getCTFill(XSSFCellStyle.java:1081)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.setFillPattern(XSSFCellStyle.java:1133)
    at
org.apache.poi.xssf.usermodel.XSSFCellStyle.setFillPattern(XSSFCellStyle.java:1154)
    at TestCopyFileExcel.copyCellStyle(TestCopyFileExcel.java:133)
...

See attachment for details.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to