The Excel file created in MS Office 2003 can not be saved as .xlsm or .xlmx file

The Excel file created in MS Office 2003 cannot be saved as .xlsm (2007 format) or .xlmx (2010 format) file.

Simple code:

string fileName = GetPathFile() + "2003.xls";
string fileName2007Out = form11.GetPathFile() + "2007Out.xls";
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(fileName);
try
{

Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook(fileName);
if (File.Exists(fileName))
{
wb.Open(fileName);
wb.Save(fileName2007Out, SaveFormat.Xlsm);

// or wb.Save(fileName2010Out, SaveFormat.Xltx);

wb = null;

}

}
catch (Exception ex)
{

string str = ex.Message;

}

File 2003.xls attached.

Can you help us?

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

I was able to replicate this issue using the latest version:
Aspose.Cells
for .NET v7.2.0.5

with the following code.

I get the following exception.

We have logged this issue in our database. Development team will look into this issue. Once the issue is resolved or we have some update relating to it, we will let you know asap.

This issue has been logged as CELLSNET-40657.

C#


string filePath = @“F:\2003.xls”;


Workbook workbook = new Workbook(filePath);

workbook.Save(filePath + “.out.xlsm”);


Exception:
An unhandled exception of type 'System.ArgumentException' occurred in Aspose.Cells.dll

Additional information: Item has already been added. Key in dictionary: 'C:\DOCUME~1\IHATUK~1\LOCALS~1\Temp\images\spacer.gif' Key being added: 'C:\DOCUME~1\IHATUK~1\LOCALS~1\Temp\images\spacer.gif'

Screenshot:

The exception is the same. Thank you for quick response!

Hi,

Please try the new fix v7.2.0.6 we have fixed your issue now.