https://issues.apache.org/bugzilla/show_bug.cgi?id=53209
Nick Burch <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO OS| |All --- Comment #2 from Nick Burch <[email protected]> --- 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 automatically * created for new workbooks * * See http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP005199291.aspx */ 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.
