poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49074] New: Creating Too Many Rich Strings Causes Excel 2007 Files to Lose All Formatting
Date Thu, 08 Apr 2010 16:32:51 GMT

           Summary: Creating Too Many Rich Strings Causes Excel 2007 Files
                    to Lose All Formatting
           Product: POI
           Version: 3.0
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: brownicu@us.ibm.com

Created an attachment (id=25245)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25245)
See the comments at the top of the attached test driver program

In POI Bug 47543, we discovered that one must apply the base cell font to the
cell itself via the cell style and not to the HSSFRichTextString object. Only
the second and subsequent fonts used in HSSFRichTextStrings should use the
HSSFRichTextString.applyFont() routine.

That approach works well up to a point, after which Excel 2003 and Excel 2007
will fail to read the font data, throwing user errors instead and showing only
the raw sheet data without any formatting.

To reproduce, run the attached Driver.java program and try to open the
generated file in Excel 2007. Excel throws an error stating that it found
"unreadable content", and all cell formatting is then lost.

Note that in the test driver program we are creating 65 rows and 10 columns of
cell data that contains footnote markers (a superscript character at the end of
each cell text). If you change the row constant to 64 rows or lower, then Excel
can read the generated content. If you use 65 rows or higher, the error
described here will occur. 

Our customers typically generate large amounts of output containing many tables
with footnotes in certain cells. When we reach the rich text limit described
here their Excel output becomes useless and we receive technical support

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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

View raw message