You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.
We recently upgraded our EPPlus to latest from 4.0.4, and the library seems to have introduced a regression.
It happens when deleting a row that has a comment in it.
System.NullReferenceException : Object reference not set to an instance of an object.
at OfficeOpenXml.ExcelCommentCollection.Delete(Int32 fromRow, Int32 fromCol, Int32 rows, Int32 columns)
at OfficeOpenXml.ExcelWorksheet.DeleteRow(Int32 rowFrom, Int32 rows)
Minimal repro:
var documentPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\..\workbook with comment.xlsx");
var outputPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"..\..\..\WorkbookWithCommentOutput.xlsx");
var fileInfo = new FileInfo(documentPath);
Assert.IsTrue(fileInfo.Exists);
using (var workbook = new ExcelPackage(fileInfo))
{
var ws = workbook.Workbook.Worksheets.First();
ws.DeleteRow(3); // NRE thrown here
workbook.SaveAs(new FileInfo(outputPath));
}
We recently upgraded our EPPlus to latest from 4.0.4, and the library seems to have introduced a regression.
It happens when deleting a row that has a comment in it.
Minimal repro:
workbook with comment.xlsx
The text was updated successfully, but these errors were encountered: