Bug 22922 - HSSFSheet.shiftRows() throws java.lang.IndexOutOfBoundsException:
Summary: HSSFSheet.shiftRows() throws java.lang.IndexOutOfBoundsException:
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 2.0-pre3
Hardware: Other other
: P3 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-04 02:07 UTC by Xuemin Guan
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Excel file used to reproduce the problem (15.00 KB, application/octet-stream)
2003-09-04 02:08 UTC, Xuemin Guan
Details
The test program to reproduce the problem. Needs to work together with the previously attached MS-Excel file. (2.34 KB, text/plain)
2003-09-04 02:10 UTC, Xuemin Guan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xuemin Guan 2003-09-04 02:07:06 UTC
When attempting shift rows on some particular Excel sheets using HSSFSheet.
shiftRows(), IndexOutOfBoundsException arises. shiftRows() works just fine most


of the time. It seems that, when merged cells are invoved, it is likely to have 
this problem.
Comment 1 Xuemin Guan 2003-09-04 02:08:32 UTC
Created attachment 8056 [details]
Excel file used to reproduce the problem
Comment 2 Xuemin Guan 2003-09-04 02:10:16 UTC
Created attachment 8057 [details]
The test program to reproduce the problem. Needs to work together with the previously attached MS-Excel file.
Comment 3 Xuemin Guan 2003-09-04 02:23:47 UTC
Have attched both a java test program and an Excel file to re-produce the 
problem. The test program(TestShiftMerged.java) asks the user to provide a row 
number. The program will shift the rows between the specified row number and the 
last row one row down. In my test, when the first row and second row is 
involved, the exception arises. It works OK otherwise. The following is some


stacktrace of one run.




[java] Input the row number or Q to quit please:


1


[java] shifting rows between:0 and 14 1 row down


[java] java.lang.IndexOutOfBoundsException: Index: 90, Size: 43
Comment 4 Danny Mui 2003-09-06 19:21:27 UTC
Committed Fix for Development and Release branch.  Please verify and thanks for
your report!