Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Edited Unassigned: delete column with filters leads to a crash (fix included) [15554]

$
0
0
when having a template with existing filters and then trying to delete some column will lead to a crash.
The issue is in file "ExcelNamedRangeCollection.cs" and function "internal void Delete(int rowFrom, int colFrom, int rows, int cols, Func<ExcelNamedRange, bool> filter)":
```
if (rows==0)
```
should be
```
if (columns > 0 && fromRow == 0 && rows >= ExcelPackage.MaxRows)
```
because the "delete" function is called in file: "ExcelWorksheet.cs" inside function: "public void DeleteColumn(int columnFrom, int columns)" with line
```
_names.Delete(0, columnFrom, ExcelPackage.MaxRows, columns);
```
which results in
```
if (rows==0)
```
could never be true.

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>