Bug 29957

Summary: HSSFSheet removeRow() & shiftRows() do not deal with hyperlinks
Product: POI Reporter: zhaoweiusa
Component: HSSFAssignee: POI Developers List <dev>
Severity: major    
Priority: P3    
Version: 2.5-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: other   

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