Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

InsertColumns updates Comment cell address but does not reparent the comment #596

Open
Prinsn opened this issue Dec 18, 2019 · 0 comments
Open

Comments

@Prinsn
Copy link

Prinsn commented Dec 18, 2019

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);
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant