Skip to content

Commit

Permalink
fix RemoveRow bug #450
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyqus committed Apr 17, 2021
1 parent a773b60 commit 03b44cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ooxml/XSSF/UserModel/XSSFSheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ public void RemoveRow(IRow row)

int idx = _rows.Count(p => p.Key < row.RowNum);// _rows.headMap(row.getRowNum()).size();
_rows.Remove(row.RowNum);
worksheet.sheetData.RemoveRow(idx); // Note that rows in worksheet.sheetData is 1-based.
worksheet.sheetData.RemoveRow(row.RowNum+1); // Note that rows in worksheet.sheetData is 1-based.

// also remove any comment located in that row
if (sheetComments != null)
Expand Down

0 comments on commit 03b44cf

Please sign in to comment.