Bug 29957 - HSSFSheet removeRow() & shiftRows() do not deal with hyperlinks
Summary: HSSFSheet removeRow() & shiftRows() do not deal with hyperlinks
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.5-FINAL
Hardware: PC other
: P3 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-07 18:28 UTC by zhaoweiusa
Modified: 2008-12-30 01:25 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhaoweiusa 2004-07-07 18:28:14 UTC
HSSFSheet removeRow(HSSFRow row) does not actually remove the row, instead it 
clears the entire row. That is not a big problem. I can bear with that. However 
I just discovered that if there is a cell in that row that has a real hyperlink 
(not a formula), that cell will become empty but still will have that hyperlink 
associated permanently. Besides, HSSFSheet's shiftRows(int startRow, int 
endRow, int n) does not actually shift hyperlinks.

Now, here is the real problem. I have an input binary EXCEL file with ten rows. 
It has hyperlinks in its second column. So, for example, cell B1 points to 
link1, cell B2 points to link2, etc., cell B10 points to link10. If I use 
removeRow() to remove the first 9 rows and use shiftRow() to shift the 10th row 
to the first row. I then output an EXCEL file. Since the hyperlinks in the 
second columns actually do not go away with the removeRow() method and shiftRows
() does not actually move hyperlinks, in the output EXCEL file, B1 (used to be 
B10) now has a hyperlink that points to link1 instead of link10.
Comment 1 Yegor Kozlov 2008-12-30 01:25:09 UTC
Fixed in r730076