I have observed your comments and the data shared by you. I would like to share with you that, this thread has been moved to Aspose.Cells forum because the issue you are facing is related to Aspose.Cells, owing to the reason that the image of worksheet is being created by Aspose.Cells and Aspose.Slides is then adding that generated image on a slide. My colleague from respective team will be glad to help you out.
We have evaluated the presented scenario while using the latest version of Aspose.Cells for Java 8.7.0.2, and we are able to notice the problem in Aspose.Cells’ generated image, that is; the legend entries in the resultant image are not in correct order as compared to the original chart in source spreadsheet. We have logged this incident as CELLSJAVA-41734 in our bug tracking system for further investigation. You have to spare us little time to properly analyze the case and get back with updates in this regard.
For your information, Aspose.Cells actually does render the image as per Ms Excel 2007 which shows the legend entries in the same order as per the output image generated by Aspose.Cells APIs. But when we open the file into MS Excel 2010 or 2013, chart’s legend items are displayed in opposite order. We will investigate if we could follow MS Excel 2010/2013 standards when generating the chart’s image.
Well, we shared the download link for the fix: v8.7.1.2 (in our previous post) where as you are actually using v8.7.1. Please try our latest fix/version: Aspose.Cells for Java v8.7.1.2
I have reevaluated the case while using the Aspose.Cells for Java 8.7.1.3 (latest at the moment) and I am still able to replicate the said problem, that is; the order of the legend entries is reversed in resultant PNG as compared to the view of chart in Excel 2013 application. I have reopened the previously logged ticket CELLSJAVA-41734 and have requested the concerned member of the team to share insight of this scenario. As soon as we get any updates in this regard, we will post here for your kind reference.
I am afraid, we haven’t yet received any updates regarding the ticket logged earlier as CELLSJAVA-41734. However, we have requested the concerned member of the product team to share the insight of the problem, and preferably an estimated schedule for the fix. As soon as we get any news in this regard, we will post here for your kind reference.
We have tested your issue with the latest version: Aspose.Cells for Java v8.7.1.4 by converting your excel file into pdf and chart images are good. The legend order is also good. Please check the page 1 in the output pdf. I have also attached the screenshot showing the legend inside the pdf for your reference.
Please make sure you are using the latest version. You can also check it via the following code.
System.out.println(CellsHelper.getVersion());
Here is the code I used to convert your excel file into pdf.
Java String path = “F:\Downloads\SAMPLE1.XLSX”;
Workbook wb = new Workbook(path); wb.save(path + “.out.pdf”);
Thanks for the update on this issue. I tried once again with the jar you suggested but still I can see the issue.
May I know whether the jar you suggested is compatible with the UNIX environment based application. (The application we are using is deployed in UNIX server).
Please note, Aspose.Cells for Java has only one requirement, that is; Java runtime environment. If it is available then the API should work fine. However, there are many vendors who provide different flavors of JDK and some times the result vary depending on the JDK type. For instance, this scenario is working fine now on Windows platform against Oracle’s JDK but when I tested the case on CentOS 6.5 against IBM’s JDK I am getting different results (attached for your reference). I have reopened the ticket CELLSJAVA-41734 and have provided my observations to the product team, however, I strongly suggest you to share your environment details as well so we could perform tests accordingly.
This is to inform you that we have fixed your issue CELLSJAVA-41734 now. We will soon provide the fix after performing QA and including other enhancements and fixes.