Thanks for your question and using Aspose.Cells for Java.
Please download and use the latest version:
for Java v220.127.116.11
Please try the property Chart.setPlotEmptyCellsType() method and see if it works fine.
If you still face any issue, please provide us your source and expected output xls/xlsx file.
We will look into it and help you asap.
Thanks for your feedback.
Could you please provide us your sample runnable code replicating your issue with Ms-Excel 2007?
We will soon check it and if it is a bug, we will fix it asap.
Thanks for your posting a sample code.
We were able to replicate this issue using the latest version with the following given code.
I have attached both output files (xls/xlsx) and screenshot for your reference. As you can see in a screenshot. Xls format is working fine but Xlsx format is not working.
We will look into this issue and fix it. Once there is some update for you, we will let you know asap.
This issue has been logged as CELLSJAVA-40341.
String filePath = “F:\Shak-Data-RW\Downloads\Population-In.xlsx”;
Workbook workbook = new Workbook(filePath);
ChartCollection charts = workbook.getWorksheets().get(0).getCharts();
Chart chart = charts.get(charts.add(ChartType.PIE, 0, 0, 15, 8));
Series series = chart.getNSeries().get(chart.getNSeries().add("=Sheet1!$K5:N5", false));
workbook.save(filePath + “.out.xlsx”, SaveFormat.XLSX);
workbook.save(filePath + “.out.xls”, SaveFormat.EXCEL_97_TO_2003);
Also, you may try the new
fix and change the format to hide the zero value data labels by
I tried this but it does not work with the attached version with excel 2007. However with the code