Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all articles
Browse latest Browse all 1877

New Post: IntegerExtension.ToStringLookup not threadsafe?

$
0
0
I get a similar error:
System.ArgumentException: An item with the same key has already been added.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at ClosedXML.Excel.XLAddress.GetTrimmedAddress()
at ClosedXML.Excel.XLWorkbook.GenerateWorksheetPartContent(WorksheetPart worksheetPart, XLWorksheet xlWorksheet, SaveContext context)
at ClosedXML.Excel.XLWorkbook.CreateParts(SpreadsheetDocument document)
at ClosedXML.Excel.XLWorkbook.CreatePackage(String filePath)

I'm using ClosedXML in a web service and the error occurs when there are concurrent calls using the library in separate threads. So it sounds like ClosedXML is not threadsafe but I'm hoping that someone can confirm and if it's possible to make changes to make it threadsafe.

Viewing all articles
Browse latest Browse all 1877

Trending Articles



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