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

Commented Unassigned: More useful error when cannot find indexed worksheet EPP 4.0 RC [15094]

$
0
0

Version: EPP 4.0 RC.
When querying for a worksheet with an invalid index position the current error is unhelpful. It would be nice if the error explained the problem.

__Eample:__
```
using (var excelFile = new ExcelPackage(fi))
{
ExcelWorksheet worksheet = excelFile.Workbook.Worksheets[0];
}

```
Current error thrown:
```
Test 'TestCanReadImportFile' failed: System.Collections.Generic.KeyNotFoundException : The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at OfficeOpenXml.ExcelWorksheets.get_Item(Int32 PositionID)
ImportExport\ImportHallisTests.cs(31,0): at RAMS.Tests.ImportExport.ImportHallisTests.CanReadImportFile()
```

__Expected error:__
Something explaining that an invalid position was not found.

Comments: Fixed in changeset b0be4ad76772

Viewing all articles
Browse latest Browse all 2262

Trending Articles



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