We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Catch duplicate series name error

Something that I had to debug today was a case where the raw data for a chart contained duplicate series names. When I created the chart in PowerPoint using Aspose.Slides it did work but the chart data workbook does not open.

It was be nice if the library detected when a duplicate series name is added and threw an exception.

Hi Shaun,

I have observed the issue statement shared by you and request you to please provide the source presentation, sample code and generated presentation reproducing the issue. I will be able to investigate the issue further on my end on provision of requested information.

Many Thanks,

Code is straightforward. Taking the 3 default series and giving them the same name.

Output file attached. The data workbook will not load.

public static void main(String[] args) throws Exception {
final Presentation pres = new Presentation();
final IChart c = pres.getSlides()
0, 0, 720, 540);
final IChartData data = c.getChartData();
final IChartDataWorkbook wb = data.getChartDataWorkbook();
wb.getCell(0, 0, 1, “Identical Series Name”);
wb.getCell(0, 0, 2, “Identical Series Name”);
wb.getCell(0, 0, 3, “Identical Series Name”);
pres.save(“D:/test.pptx”, SaveFormat.Pptx);
Desktop.getDesktop().open(new File(“D:/test.pptx”));


I have worked with the sample code shared and have been able to reproduce the issue on my end. An issue with ID SLIDESJAVA-34980 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

We are sorry for your inconvenience,

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