HSSFSheet.addMergedRegion() returns index of the region,which starts from 0,but return value of XSSFSheet.addMergedRegion() starts from 1 Is it a Bug?Their interface Sheet does not mention this ============== Implementation In HSSFSheet: return mrt.getNumberOfMergedRegions()-1; And in XSSFSheet: return ctMergeCells.sizeOfMergeCellArray(); forgot -1? Version:4.0.1
Created attachment 36539 [details] Patch to make the return value of XSSFSheet.addMergedRegion zero-based
Fixed on trunk via r1858021, thanks for the patch!