Bug 53043 - Hyperlink relations are duplicated when saving XSSF file
Summary: Hyperlink relations are duplicated when saving XSSF file
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC All
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
Depends on:
Reported: 2012-04-05 22:38 UTC by David Cross
Modified: 2012-04-21 12:51 UTC (History)
0 users

initially created xlsx file (7.66 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-04-05 23:01 UTC, David Cross
xls file after opening/saving in poi (5.69 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-04-05 23:03 UTC, David Cross

Note You need to log in before you can comment on or make changes to this bug.
Description David Cross 2012-04-05 22:38:38 UTC

Comment 1 David Cross 2012-04-05 23:01:20 UTC
Created attachment 28552 [details]
initially created xlsx file
Comment 2 David Cross 2012-04-05 23:02:20 UTC
Opening and saving an XSSF workbook using ss.usermodel results in all hyperlink relations being duplicated in file/xl/worksheets/_rels/sheet.xml.rels. For example create a worksheet (excel or poi) with a single cell entry & hyperlink. This file will have a single relation entry in the location mentioned above.  Open file and save file with or without making modifications.  Now notice that again in the location given above there is a second hyperlink relation in the xml. This issue does not seem to effect how files are accessed, however this has become a critical issue for me as i have a file with ~5000-10000 hyperlinks that is opened and saved repeatedly. This results in all of the links being duplicated each time and it doesn't take long before the xml.rels file size exceeds several hundred Mb. This in turns seriously degrades performance.

Note opening file in excel and re-saving removes all duplicate rels entries.

Attached are xlsx files before and after opening/saving in poi.
Comment 3 David Cross 2012-04-05 23:03:19 UTC
Created attachment 28553 [details]
xls file after opening/saving in poi
Comment 4 Yegor Kozlov 2012-04-21 12:51:30 UTC
Fixed in r1328653, junit added.