We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Item has already been added. Key in dictionary: 'Auto_Open' Key being added: 'Auto_Open'

Hi,

When creating a new workbook object from a stream, we are seeing the following error.

using (Stream template = Shared.Assembly.GetManifestResourceStream(_TemplatePath)) {
result = new Workbook(template);

System.ArgumentException: Item has already been added. Key in dictionary: ‘Auto_Open’ Key being added: ‘Auto_Open’
at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at Aspose.Cells.Name.()
at Aspose.Cells.Name. (String )
at Aspose.Cells.Name.(String )
at ? . (? )
at ? .(? , Boolean )
at ? . ? ? ()
at ? .()
at ? .(Workbook , LoadOptions , Boolean )
at .(Stream )
at .(String , Stream , LoadOptions )
at Aspose.Cells.Workbook.(Stream , LoadOptions , Boolean )
at Aspose.Cells.Workbook…ctor(Stream stream)

@msbair,

Thanks for the error trace.

Please provide a simple console application (runnable), zip the project and post us to reproduce the issue, we will check it soon. Also provide your template file used in your code.

Hi Aspose,

We have this issue also one time in a multi treading Excel generation:
System.ArgumentException: Item has already been added. Key in dictionary: ‘Auto_Open’ Key being added: ‘Auto_Open’

at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)

at Aspose.Cells.Name._()

at Aspose.Cells.Name._ (String _)

at Aspose.Cells.Name._(String _)

at _ ​ ._ (_ _)

at _ ​ .( _, Boolean _)

at _ ._ _()

at _ ._()

at _ ​ ._(Workbook _, LoadOptions _, Boolean _)

at _ ._(String _, Stream _, LoadOptions _)

at Aspose.Cells.Workbook._(String _, LoadOptions _)

at …

We not have a repoduce path. The Asponse Cell version that we now use is 19.12.0

If this issue is fixed in a new version please let us know.

Thanks,

Matthijs

@GazpromEnergy,

Thanks for the error description.

We recommend you to kindly try using our latest version/fix, i.e., Aspose.Cells for .NET v20.4.x. If you still find the issue, we need a simulation sample to evaluate your issue precisely as we got to reproduce the issue on our end first. Please provide a simple console application (runnable), zip the project and post us to reproduce the issue, we will check it soon. Also provide your template files (if any) used in your code.