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

Free Support Forum - aspose.com

Worsheet.Copy is pegging CPU at 100%

Hello,

We recently upgraded to the newest version of Aspose Cells (5.0.0) and it appears to have an issue with copying workseets between workbooks. This issue did not exist with the previous version of Aspose Cells that we were using. This appears to only happen with some Excel files, others are fine. When executing the .Copy method the CPU will go to 100% and just sit there and never return to the debugger.

Please see the attached and sample code to produce the issue. This is critical that we get this fixed as soon as possible.

Thank you.

Workbook wb = new Workbook();

License lic = new License();

lic.SetLicense(@"C:\projects\K-1G\CodeLibrary\3rdParty\Aspose\Aspose.Cells.lic");

wb.Open(@"c:\files\1438_ShortName.xlsx");

Workbook wb2 = new Workbook();

wb2.Worksheets.Clear();

wb2.Worksheets[0].Copy(wb.Worksheets[0]);

wb2.Save(@"c:\files\\final.xlsx");

Hi,

I can find the issue using the following code with your template file.
Workbook wb = new Workbook();
wb.Open(@“e:\test\1438_ShortName.xlsx”);
Workbook wb2 = new Workbook();
wb2.Worksheets.Clear();
wb2.Worksheets[wb2.Worksheets.Add()].Copy(wb.Worksheets[0]);
wb2.Save(@“e:\test\out.xlsx”);

I have logged your issue into our issue tracking system with an issue id: CELLSNET-18054. We will figure it out soon.

Thank you.

Hi,

Please change your code to:

Workbook wb = new Workbook();

wb.Open(@“e:\test\1438_ShortName.xlsx”);
Workbook wb2 =
new Workbook(FileFormatType.Excel2007Xlsx);
wb2.Worksheets.Clear();

wb2.Worksheets[wb2.Worksheets.Add()].Copy(wb.Worksheets[0]);

wb2.Save(@“e:\test\out.xlsx”);

it will works fine.

And, we will continue to fix the issue.

Thank you.

Hi,

Please try the attached version.

We have fixed the issue.

Thank you.

The issues you have found earlier (filed as 18054) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.