poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53209] Too many styles corrupts the excel
Date Wed, 09 May 2012 21:35:04 GMT

Nick Burch <nick.burch@alfresco.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #2 from Nick Burch <nick.burch@alfresco.com> ---
In HSSF, we have a maximum number of styles, and throw an exception if someone
tries to add more than that

     * The maximum number of cell styles in a .xls workbook.
     * The 'official' limit is 4,000, but POI allows a slightly larger number.
     * This extra delta takes into account built-in styles that are
     * created for new workbooks
     * See
    private static final int MAX_STYLES = 4030;

The .xlsx file format also has a maximum number of styles, but it doesn't look
like we enforce that in the same way. From a quick check, neither
XSSFWorkbook.createCellStyle() nor StylesTable appears to have the check

The fix is probably for someone to dig out the official maximum number of
styles in a .xlsx file, from the file format docs, then implement a similar
check in xssf

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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message