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

Created Unassigned: An exception happed when reading XSLX after Liber Office editing [15569]

$
0
0
```
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at OfficeOpenXml.ExcelNamedRangeCollection.AddName(String Name, ExcelNamedRange item)
at OfficeOpenXml.ExcelNamedRangeCollection.Add(String Name, ExcelRangeBase Range)
at OfficeOpenXml.ExcelWorkbook.GetDefinedNames()
at OfficeOpenXml.ExcelPackage.get_Workbook()
```
Here is code:

``` C#
using (var pck = new ExcelPackage())
{
pck.Load(readStream);
foreach (var worksheet in pck.Workbook.Worksheets)
// ...
}
```
Spreadsheet file is attached.

I think correct behavior is to merge or overwrite ranges with same name. Not to throw exceptions.

Viewing all articles
Browse latest Browse all 2262


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