Search code examples
c#excelepplus

EPPlus worksheet.DeleteRow is not deleting the full row


I call ws.DeleteRow(1,11,true) in a process and previously this was working fine.

Now though it deletes the row up until column G

Columns G and H are only having 6 rows deleted instead of the expected 11

What could cause this change? Things have been fine for months with this process.


Solution

  • I still don't know the root cause that was preventing deletion of those 5 rows in the 2 columns, all the cells look empty.

    As a workaround, I ran ws.Cells[1,1,11,8].Value = null; on the line before calling DeleteRow and that took care of the issue.