Unreadable xls file when using AddCopy


#1

Hello,

I recently upgraded to newest Aspose.Cells verion 4.0.2.0 (from version 3.x).
I’ve noticed that this version has some problem with AddCopy method with complex worksheets.
Version 4.0.2.0 creates xls that cant be opened with Excel. Version 3.x was working fine.
My sample c# souce code:
Aspose.Cells.Workbook wbk=new Aspose.Cells.Workbook();
wbk.Open(“C:\Temp\Test.xls”);
wbk.Worksheets.AddCopy(“Germany”);
wbk.Save(“C:\TEMP\test_output.xls”);


I attached sample Test.xls file I used in this example.


#2

Please try this attached fix.


#3

It is much better now. But there’s another problem I discovered (was fine in 3.x).
AddCopy method deals incorrectly at least with Indirect function.
Here’s how my sample indirect function looks in source worksheet:
=INDIRECT("’"&$B$5&"’"&"!$A$1")
Here’s how it looks on a worksheet created by AddCopy method - some extra semicolons that are causing #Ref errors.
=INDIRECT("’""&$B$5&""’"&"!$A$1")


My sample c# code:
Aspose.Cells.Workbook wbk=new Aspose.Cells.Workbook();
wbk.Open(“C:\Temp\Test3.xls”);
wbk.Worksheets.AddCopy(“Source”);
wbk.Save(“C:\TEMP\test3_output.xls”);

Test3.xls that I used is attached.


#4

I fixed it in the attached version. Please try it.


#5

The version you attached fixed problem I reported.
But unfortunately I have a new one (it was working fine in version 4.0.2.0).
When I try to open the attached xls and save it using Aspose.Cells it crashes Excel.
Sample source code:
Aspose.Cells.Workbook wbk=new Aspose.Cells.Workbook();
wbk.Open(“C:\temp\test5.xls”);
wbk.Save(“C:\temp\test5_output.xls”);



#6

Please try this attached version.