Free Support Forum -

Problem with the creation of a chart LINE on XLSX file


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);
chart.getNSeries().add(“A1:B4”, true);“c:\test.xls”, FileFormatType.EXCEL97TO2003); // In XLS, it is correct“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 v2.5.3.8, 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.


Thank you for bringing this to our knowledge.
We are able to reproduce your said issue, so we have logged it in our bug tracking system under Ticket ID CELLSJAVA-27932. Soon we will update you on this.


Thanks for reporting.

I was able to reproduce this issue with Aspose.Cells for Java v2.5.3.8. 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 :slight_smile:


Thanks for your posting.

No problem, these issues have been marked as related and duplicate in our database.


We have fixed your said issue in latest fix version of Aspose.Cells for JAVA v2.5.4.1 [attached]. Please try your requirement with this new JAR and let us know of your feedback.
Thank you.


I’ve tried with version, and the problem is now solved!

Thanks again.

The issues you have found earlier (filed as 27932) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.