We use Aspose.Total 22.11.0 for .NET to convert old Office-files to newer Office formats. We got Aspose.Words and Aspose.Slides working. Aspose.Cells seems to have trouble saving .xls files to newer .xlsx. Aspose throws the following error when trying to save the file to xlsx:
Item has already been added. Key in dictionary: ‘0ecff379-717b-4ae9-88c8-0d8c4180f00a’ Key being added: ‘0ecff379-717b-4ae9-88c8-0d8c4180f00a’
Note that the guid in this exception is always the same (regardless of the time of running or the file used).
I have tried the following:
Using a different file-format to save the .xls file (ig ods, xls, pdf etc.) works.
I have tried many .xls files, including newly created office 97-2003 files (using Office365), they all throw the same error.
Loading an .xlsx file and saving as a .xlsx file DOES work.
I have tried to use the methods “RemoveDigitalSignature, RemoveMacro, RemovePersonalInformation, RemoveUnusedStyleFormats” before savng the file to remove some potential data that might cause conversion troubles.
Also I have checked whether Aspose detects the right format through the property “FileFormat”. It does.
I have tried installing different versions of Aspose.Cells. All behave the same way.
I have tried supplying an explicit fileformat with the save-method. This does not work for the xlsx format (but does for xls and so on).
I have made your thread “private”. Now you may safely attach your attachments. Now no other users (except you and Aspose staff members) could see or download your attachments. Alternatively, you may create a new file with dummy data and share with us to reproduce the issue.
Thanks Amjad Sahi! I made a .zip file of a newly created 97-2003 excel file with only testdata. Using this file I get the exact same errormessage as before. If convenient you can make the thread public again.
I can supply more files if necessary. One thing to notice: The files are stored in SharePoint. They are downloaded, then converted (which fails for these kind of Excel files) and then uploaded again. I don’t know whether this makes much of a difference, but it might be good to know.
Please notice, I am able to reproduce the issue as you mentioned by converting your template file to XLSX. I found an exception “Item has already been added. Key in dictionary: ‘0ecff379-717b-4ae9-88c8-0d8c4180f00a’ Key being added: ‘0ecff379-717b-4ae9-88c8-0d8c4180f00a’” on saving to XLSX file format. I have logged a ticket with an id “CELLSNET-52493” for your issue. We will look into it soon.
Once we have an update on it, we will let you know.
We are pleased to inform you that your issue has been resolved now. The fix will be included in our upcoming release (Aspose.Cells v23.1) which is scheduled in the second week of January 2023. You will be notified once the next release is published.