Bug 49895 - [PATCH]POI corrupts excel file after removing all merged cells from sheet.
[PATCH]POI corrupts excel file after removing all merged cells from sheet.
Status: RESOLVED FIXED
Product: POI
Classification: Unclassified
Component: XSSF
3.7-dev
PC Windows XP
: P2 normal (vote)
: ---
Assigned To: POI Developers List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2010-09-08 07:24 UTC by Petr.Udalau
Modified: 2010-09-11 09:48 UTC (History)
0 users



Attachments
Example of corrupted file. (7.61 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2010-09-08 07:25 UTC, Petr.Udalau
Details
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]
Patch.
Comment 3 Yegor Kozlov 2010-09-11 09:48:17 UTC
Applied in r996148

Yegor