You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/06/30 13:47:02 UTC

[Bug 56683] New: SXSSF generated corrupted report in z/OS on applying cell Style

https://issues.apache.org/bugzilla/show_bug.cgi?id=56683

            Bug ID: 56683
           Summary: SXSSF generated corrupted report in z/OS on applying
                    cell Style
           Product: POI
           Version: 3.10
          Hardware: Other
                OS: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: ranju4u6@gmail.com

I am trying to execute a program in z/OS machine to write an Excel report. Due
to size of the report, we are using SXSSFWorkbook to write the report.

One of the cells in the report is grey in color. So I have to apply Color to
that cell. I used the following code to set the color.

XSSFCellStyle cellStyle = (XSSFCellStyle) wb.createCellStyle();
XSSFColor myColor = new XSSFColor(DatatypeConverter
        .parseHexBinary("FFBFBFBF")); //also tried the java.awt.Color
cellStyle.setFillForegroundColor(myColor);
cellStyle.setFillPattern(CellStyle.SOLID_FOREGROUND);
cell.setCellStyle(cellStyle);

But for the report generated, this cell is dark in color. Out of curiosity, I
checked the Styles.xml inside the Excel document. The following is what I
found.

<fill><patternFill patternType="solid"><fgColor
rgb="ããâãâãâã"/></patternFill></fill>
I tried to generate the same report in a Windows machine, and it gave me
correct result.

<fill><patternFill patternType="solid"><fgColor rgb="FFBFBFBF"/></patternFill>

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


[Bug 56683] SXSSF generated corrupted report in z/OS on applying cell Style

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56683

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
The bad news is that this looks like it might be an xmlbeans bug

Any chance you could add the xmlbeans generated source to your IDE, then step
into the CTColor code in a debugger and see how it serialises the bytes into
xml?

See http://poi.apache.org/faq.html#faq-N1012A for help on getting the source of
the CT classes

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56683] SXSSF generated corrupted report in z/OS on applying cell Style

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56683

--- Comment #2 from Renjith <ra...@gmail.com> ---
Not sure if the following update will fix it. need to try it out.

Updated writeTo() method of 'org.apache.poi.xssf.model.StylesTable'.

Change: Added the following line 

             'DEFAULT_XML_OPTIONS.setCharacterEncoding("UTF-8");'


    /**
     * Write this table out as XML.
     *
     * @param out The stream to write to.
     * @throws IOException if an error occurs while writing.
     */
    public void writeTo(OutputStream out) throws IOException {
        //Setting default encoding to UTF-8
        DEFAULT_XML_OPTIONS.setCharacterEncoding("UTF-8");

        XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS);

Since i dont have control over the z/os server, i have to wait till it get
tested.
In the mean time, please let me know your thoughts on the same.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56683] SXSSF generated corrupted report in z/OS on applying cell Style

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56683

Renjith <ra...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56683] SXSSF generated corrupted report in z/OS on applying cell Style

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56683

Nick Burch <ap...@gagravarr.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Nick Burch <ap...@gagravarr.org> ---
Default of UTF-8 set in r1613193.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org