EPPlus
EPPlus copied to clipboard
InsertColumns updates Comment cell address but does not reparent the comment
Inserting a column appears to parent comment objects to the new column while updating the cell address to the new column.
This leads to an inability to delete the comment by address, or delete the column.
ws.Cells["A1"].AddComment("na", "test");
ws.InsertColumn(1, 1);
Log(ws.Cells["A1"].Comment.Address); // => "B1"
//Throws a null reference exception
ws.Comments.Remove(ws.Cells["B1"].Comment);
//Throws an exception "Comment does not exist"
ws.DeleteColumn(2);