Bug 49895

Summary: [PATCH]POI corrupts excel file after removing all merged cells from sheet.
Product: POI Reporter: Petr.Udalau <Petr.Udalau>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.7-dev   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Attachments: Example of corrupted file.

Description Petr.Udalau 2010-09-08 07:24:03 UTC
Create new XSSFSheet and some merged regions. Remove all merged regions and save workbook. When you try to open workbook with MS Excell it will propose you repair you excel file.

Excell does not allows empty section "mergeCells" for sheet(see sheet2.xml in attached example).

Solution: Use unsetMergeCells() of CTWorksheet after removing the last merged region on the sheet.
Comment 1 Petr.Udalau 2010-09-08 07:25:05 UTC
Created attachment 26002 [details]
Example of corrupted file.
Comment 2 Petr.Udalau 2010-09-08 07:29:23 UTC
Created attachment 26003 [details]
Comment 3 Yegor Kozlov 2010-09-11 09:48:17 UTC
Applied in r996148