I want to create a simple Chart, of type “Line”. Unfortunately, when I save my Excel file as a XSLX format, the chart type is “Line with data markers” and not “Line”.
To create the Chart, I use the following code:
Workbook workbook = new Workbook();
Worksheet ws = workbook.getWorksheets().getSheet(0);
Cells cells = ws.getCells();
// Create the Chart
Chart chart = ws.getCharts().addChart(ChartType.LINE, 5, 1, 15, 5);
workbook.save(“c:\test.xls”, FileFormatType.EXCEL97TO2003); // In XLS, it is correct
workbook.save(“c:\test.xlsx”, FileFormatType.XLSX); // In XLSX, the type of chart is not correct
The chart on the Excel 97/2003 is correct.
I am using Aspose Cells v220.127.116.11, Java 1.6 and Excel 2007 sp2.
You can find the two Excel files generated attached to this post.
What am I doing wrong?
Thanks in advance.
Thanks for reporting.
I was able to reproduce this issue with Aspose.Cells for Java v18.104.22.168. We will fix it as soon as possible.
This issue has been logged as CELLSJAVA-27933.
Thanks for your quick reply.
However, be carefull as you created 2 defects for the same issue
Thanks for your posting.
No problem, these issues have been marked as related and duplicate in our database.
I’ve tried with 22.214.171.124 version, and the problem is now solved!