Worksheet and Workbook.Copy() doesn't work in 7.2.0

Please duplicate the error as follows.


Use excel 2003 to create blank workbook and save as source.xls.

Copy workbook with following code
Workbook src = new Workbook(“source.xls”);
Workbook b = new Workbook();
b.Worksheets.Clear();
b.Copy(src);
b.Save(“target.xls”);

Open target.xls with excel 2003 will prompt "Unable to read file."

However, above code works fine at 7.0.3

Hi,


Please download and use our latest release of Aspose.Cells Aspose.Cells for .NET 7.2.1. I was unable to reproduce this issue with our latest version. You can see the source as well as target workbooks in the attached snapshot.

Please let us know your feedback

hi,

I'm sad to tell you that this bug can be reproduced in 7.2.1. Below is the repair log from excel 2003.
The only workaround is to use target.CopyRows(source.Cells, .....) across two worksheets.

Again, Copy() works fine in version 7.0.3.

====================================================
Microsoft Office Excel File Repair Log

Errors were detected in file 'C:\target.xls'
The following is a list of repairs:

Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted.
====================================================

hylin

Hi,

Please download and try the latest version/fix: Aspose.Cells for .NET v7.2.1.3


We tried using code with even v7.2.1.0 with your template file, it worked fine as Kashif mentioned.

If you still find the issue, kindly create a sample console application with v7.2.1.3, zip it and post it here to show the issue (with all the files), we will check it soon. Also, attach some screen shots to point out the error messages in MS Excel.

Thank you.