https://issues.apache.org/bugzilla/show_bug.cgi?id=57307
Bug ID: 57307
Summary: removeMergedRegion() throws IndexOutOfBoundsException
on .xlsx MS-Excel file
Product: POI
Version: 3.10-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: XSSF
Assignee: [email protected]
Reporter: [email protected]
Created attachment 32259
--> https://issues.apache.org/bugzilla/attachment.cgi?id=32259&action=edit
removeMergedRegion tested excel
removeMergedRegion() throws an IndexOutOfBoundsException on .xlsx file. But is
working on .xls file
Here I have pasted the tested the code
void removeRow(Sheet sheet){
if(sheet){
for(i in sheet.getFirstRowNum()..sheet.getLastRowNum()){
Row row = sheet.getRow(i)
if(!row){
continue
}
for(j in row.getFirstCellNum()..row.getLastCellNum()){
if(j<0){
continue
}
sheet.removeMergedRegion(j)
}
sheet.removeMergedRegion(i)
sheet.removeRow(row)
}
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]