Free Support Forum - aspose.com

XLS to XLSX conversion using Aspose.Cells for Java does not replicate graphs properly

Hello All,


I am using aspose cells for java for the conversion of .xls to .xlsx . I am using the Aspose.Cells for Java 8.5.2 jar. While I execute my program the converted file’s(.xlsx) graph are not the same as of the original .xls.


My conversion code:

String source = “//C:/source/test.xls”;
File folder = new File(source);
Workbook book = new Workbook(folder.getAbsolutePath());
book.save("//C:/output/" + name + “.xlsx”, SaveFormat.XLSX);

Attached is the converted and original Excel sheet with the graph.
I find changes to the colors of graph and in other cases(not shown in pic) the arrows are distorted.

I want the excell sheet to be replicated as it in original (.xls) format after conversion…
Could some one please help.

Regards,
S.Saai Kaarthik

Hi,


Thanks for the screen shots and sample code.

Please try our latest version/fix: Aspose.Cells for Java v8.5.2.3 if it makes any difference.

If you still find the issue, kindly provide your template XLS file here, we will check it soon.

Thank you.

Hello Amjad Sahi,


Thank you for your proposed solution.
But unfortunately, even after replacing the latest jar, the issue occurs.


Thanks and Regards,
S.Saai Kaarthik

Hi,


Thanks for the template files.

After an initial test, I observed the issue as you mentioned. I found Aspose.Cells does not replicate graph properly in XLS to XLSX conversion. The graph is not identical as there are differences regarding line’s color, width and placements etc. in the output XLSX file format. I used the following sample code with your template XLS file.
e.g
Sample code:

Workbook workbook = new Workbook(“test.xls”);
workbook.save(“out1.xlsx”, SaveFormat.XLSX);

I have logged a ticket with an id “CELLSJAVA-41472” for your issue. We will look into it soon.

Once we have any update on it, we will let you know here.

Thank you.

Hi,


Please try our latest version/fix: Aspose.Cells for Java v8.6.0.3 (attached).

We have
improved the conversion (XLS to XLSX). The plots’s position in XLS are automatic in most cases. We can’t get exact position information by Calculate() method. So the
result is still not 100% same as MS Excel.

Thank you.

@SaaiKaarthik,

Please try our latest fix: Aspose.Cells for Java v21.4.2:

aspose-cells-21.4.2-java.zip (7.3 MB)

Your issue should be fixed precisely in it.

Let us know your feedback.