Bug 17222: Workbook corruption when using sheet.addRow()
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@353009 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3639f502a4
commit
b0c4a37953
@ -995,6 +995,10 @@ public class Sheet implements Model
|
|||||||
d.setFirstRow(row.getRowNumber());
|
d.setFirstRow(row.getRowNumber());
|
||||||
}
|
}
|
||||||
//IndexRecord index = null;
|
//IndexRecord index = null;
|
||||||
|
//If the row exists remove it, so that any cells attached to the row are removed
|
||||||
|
RowRecord existingRow = rows.getRow(row.getRowNumber());
|
||||||
|
if (existingRow != null)
|
||||||
|
rows.removeRow(existingRow);
|
||||||
|
|
||||||
rows.insertRow(row);
|
rows.insertRow(row);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user