Summary: Reject single-cell merged regions? At the moment, both the XSSF and HSSF implementations of Sheet.addMergedRegion allow merged regions to be added which are single-cell ranges. Excel 2007 and up complain that the workbook is corrupted in the case of an .xlsx containing single-cell merged regions. Would it be reasonable to throw an IllegalArgumentException from addMergedRegion if the range is a single cell? If so, happy to supply a patch & tests.
Yes, I think this would be useful. Please provide such a patch/test if possible
Added to (S)XSSFSheet.addMergedRegion in r1727776 Remaining: fix HSSFSheet.addMergedRegion [1] [1] https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFSheet.java?revision=1717903&view=markup#l660
Added HSSFSheet implementation and unit test in r1730991.
Updated site docs in r1730993