Currently, AbstractExcelImporter determines whether a POI cell style is duplicated or not by cell style's index. But we found some styles with different indexes have identical content (see attached Excel file). 3.5 importer cannot reduce style count for such kind of Excel file. The attached Excel file provided by customers is created by continuously editing and adding sheets in the same file in 2.6 ZSS. Its style object count already exceeds Excel file upper limit according to specification. So open the file with Excel will prompt users to recover it.
Excel specification and limits
If an importer can compare incoming style and imported style with their content, when two styles content are identical, it reuses previously imported style object without creating new one.
I found XSSFCellStyle and HSSFCellStyle both implement equal() and hash(). Just change current importedStyle key with CellStyle can make this work. (see ReduceRedundantStyleImporter.java)