I'm trying to construct an xls file with plenty of merged cells, about 5 separate groups of merged cells per row. This works fine until the number of rows exceeds about 1000. When I try to open the file in MS-Excel 2000, I get a message saying: " Unable to open file", and then refuses to open the file. Has anybody out there experienced anything similar, and possibly found a solution? I'm using the latest release version of POI, in jakarta-poi-1.5.1-final- 20020615.jar. To add the merged cells, I'm creating a new org.apache.poi.hssf.util.Region object and adding that to the HSSFSheet instance using the addMergedRegion method, eg Region region = new Region(rowNum, colFrom, rowNum, colTo); m_Sheet.addMergedRegion(region); JDK version: j2sdk1.4.1_01 OS: Windows XP 5.1, build 2600.xpsp 1.020828-1920: service pack 1.
I plan to fix this in 3.0
*** Bug 19381 has been marked as a duplicate of this bug. ***
Re-tested OK in latest svn This was probably fixed some time ago (pre version 3.0). There is a junit which seems to test this exact functionality: TestSheet.testAddMergedRegion(). The junit was added in svn r353660 (May 2005).