-
Notifications
You must be signed in to change notification settings - Fork 272
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
System.ArgumentOutOfRangeException when using ExcelWorksheet.InsertRow #582
Comments
This is the intended behaviour. Discarding overflowing cells on rows or columns without a notification sounds dangerous to me. If you are writing a rolling log appender I can understand this behaviour, but Excel data is usually financial data. What is the use case for your scenario? |
Use case: The system inserts data at marker position {{table1}} (see (1) in the screenshot). Below the marker there is some text (see (2) in the screenshot) that is not important in case of overflowing. |
[Description]
EPPlus version: 5.8.1
Put some data (it may be even cell with changed background only) at last row of excel
![image](https://user-images.githubusercontent.com/25109940/150536758-202f04d5-35c5-4608-804d-71d5e82d18f4.png)
insert 1 row at any position, e.g. ExcelWorksheet.InsertRow(1,1)
[Result]
[ExpectedResult]
No exception, new rows inserted, excessing count of rows (i mean Rows beyond > 1,048,576) are annihilated.
[AdditionalInfo]
![image](https://user-images.githubusercontent.com/25109940/150538346-548875b8-853e-40a3-bc66-5dd79dea1951.png)
I'm aware of Excel behaviour:
but, it seems to be ok in GUI app - cause user get instant feedback and can react.
another story: EPPlus on backend without direct interaction with user - it could handle this on behalf of user (kind of cool)
Right now before any insertion, a developer should check Sheet.Dimension.End, find last index of Row, count how many Rows to delete to free space. Maybe the more appropriate place for such code is inside EPPlus library?
The text was updated successfully, but these errors were encountered: