We are using the SoftArtisans ExcelWriter to open and process data from various excel files. One file has recently begun giving us the following error:
An item with the same key has already been added.
I've attempted the Excel repair options for repairing the file and extracting the data, but both the repaired files and the original file continue to return the same error.
Stack Trace, as promised:
System.ArgumentException was unhandled by user code
HResult=-2147024809
Message=An item with the same key has already been added.
Source=mscorlib
StackTrace:
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 SoftArtisans.OfficeWriter.ExcelWriter.XMLModel..ᜀ()
at SoftArtisans.OfficeWriter.ExcelWriter.XMLModel...ctor(᜴ A_0, ᝉ A_1)
at SoftArtisans.OfficeWriter.ExcelWriter.XMLModel.ᝂ.ᜀ()
at SoftArtisans.OfficeWriter.ExcelWriter.Model.ᜉ..ctor(ល A_0, រ A_1, ᝣ A_2, ᡆ A_3)
at SoftArtisans.OfficeWriter.ExcelWriter.Model.ល..ctor(ᝣ A_0, ᠐ A_1)
at SoftArtisans.OfficeWriter.ExcelWriter.Model.ោ..ctor(ᝣ A_0, IEnumerable`1 A_1)
at SoftArtisans.OfficeWriter.ExcelWriter.XMLModel...ctor(᜔ A_0, A_1, ᝂ A_2, ឤ A_3)
at SoftArtisans.OfficeWriter.ExcelWriter.XMLModel..ᜄ()
at SoftArtisans.OfficeWriter.ExcelWriter.XMLModel.᜔.ᜀ()
at SoftArtisans.OfficeWriter.ExcelWriter.XMLModel.᜔..ctor(Stream A_0, String A_1, A_2)
at SoftArtisans.OfficeWriter.ExcelWriter.ᜊ.ᜀ(Stream A_0, String A_1, Boolean A_2)
at SoftArtisans.OfficeWriter.ExcelWriter.ᜊ.ᜀ(Stream A_0, Boolean A_1)
at SoftArtisans.OfficeWriter.ExcelWriter.ExcelApplication.Open(Stream stream)