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.
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.