Bug 49895 - [PATCH]POI corrupts excel file after removing all merged cells from sheet.
Summary: [PATCH]POI corrupts excel file after removing all merged cells from sheet.
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.7-dev
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2010-09-08 07:24 UTC by Petr.Udalau
Modified: 2010-09-11 09:48 UTC (History)
0 users

Example of corrupted file. (7.61 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2010-09-08 07:25 UTC, Petr.Udalau
Patch. (540 bytes, patch)
2010-09-08 07:29 UTC, Petr.Udalau
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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