Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveAs exception after InsertCellsBefore #1236

Closed
1 task done
BennM666 opened this issue Jun 25, 2019 · 0 comments · Fixed by #1247
Closed
1 task done

SaveAs exception after InsertCellsBefore #1236

BennM666 opened this issue Jun 25, 2019 · 0 comments · Fixed by #1247
Assignees
Labels

Comments

@BennM666
Copy link

  • Bug

Version of ClosedXML

0.94.2

What is the current behavior?

If I try to access the last cell of a line and then I insert a cell (even on another line) when I save I have an exception : System.ArgumentOutOfRangeException with 'columnNumber'

Code to reproduce problem:

public void Main()
{
            var wb = new XLWorkbook();
            var ws = wb.AddWorksheet("Feuil1");
            var maxCell = ws.Cell(5, ws.ColumnCount());
            maxCell = null;
            ws.Cell(100, 100).InsertCellsBefore(1);
            wb.SaveAs("testInsert.xlsx");
            wb.Dispose();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants