DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22720>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22720 Exception occurs when deleting merged cells from cloned sheet Summary: Exception occurs when deleting merged cells from cloned sheet Product: POI Version: 2.0-pre3 Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: HSSF AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I clone a worksheet with merged cells, and then delete the merged cells from the clone: HSSFSheet sheet = workBook.cloneSheet(templateSheetIndex); for (int i=sheet.getNumMergedRegions()-1; i>=0; i--) { sheet.removeMergedRegion(i); } This results in: java.lang.IndexOutOfBoundsException: Index: 157, Size: 41 at java.util.ArrayList.RangeCheck(ArrayList.java:508) at java.util.ArrayList.remove(ArrayList.java:388) at org.apache.poi.hssf.model.Sheet.removeMergedRegion(Sheet.java:506) at org.apache.poi.hssf.usermodel.HSSFSheet.removeMergedRegion (HSSFSheet.java:564) Index and size shown in the error message doesn't make sense because the source sheet only has 4 merged cells. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
