Hi,
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).
The code excerpt is as simple as this:
fileName = @“D:\test.xls”
newFileName = @“D:\test.xlsx”
Aspose.Cells.Workbook workbook = new Aspose.Cells.Workbook(fileName);
workbook.Save(newFileName);
What might be going wrong?
Kind Regards
Ingmar van de Beld