Excel 2010 error when copying a tab with a chart

Hello,


I’m trying to copy a sheet in my workbook. In this sheet there is a graphic. Copying seems good, but when I try to open the file, Excel show me an error (I added the Excel report of error in the XML file but it’s in French, so here is the translation).

Repaired Records: Drawing from /xl/drawings/drawing3.xml part (Drawing shape)

I searched for an answer but couldn’t find one. I downloaded the last version of Aspose cells : 7.3.1.0.

Here’s my code (c#)

File.Copy(“Excel/ListeExpress.xlsx”, “D:/ENT/TestCopyTab.xlsx”, true);
var oWorkbook = new Workbook(“D:/ENT/TestCopyTab.xlsx”);

var index = oWorkbook.Worksheets.AddCopy(“Test”);
var activeSheet = oWorkbook.Worksheets[index];
activeSheet.Move(3);
activeSheet.Name = “testDupli”;

oWorkbook.Save(“D:/ENT/TestCopyTab.xlsx”);

And attached you can find my test file.

Also the axis labels style changes even if I just copy the chart. Is this because of this usse or is it a second one ?

Could you help me to resolve this, please?

Hi,

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

Please download and use the latest fix:
Aspose.Cells
for .NET v7.3.1.2

It should work fine.

I have tested your issue with the above fix using the following code and it works fine. The output file opens without any error in Ms-Excel 2010.

Please see the attached output file generated by the following code.

C#



string filePath = @“F:\Shak-Data-RW\Downloads\ListeExpress.xlsx”;


var oWorkbook = new Workbook(filePath);


var index = oWorkbook.Worksheets.AddCopy(“Test”);

var activeSheet = oWorkbook.Worksheets[index];

activeSheet.Move(3);

activeSheet.Name = “testDupli”;


oWorkbook.Save(filePath + “.out.xlsx”);