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

Free Support Forum - aspose.com

Corrupted chart sheet

Adding more than 26 columns in a chart data worksheet is resulting in corrupted data. There is no error message when you open the file, but the chart data will not load. If you extract the pptx file and browse to ppt\embeddings and try to open the xlsx file independently it reports unreadable content.

Code to reproduce:

public static void main(String[] args) {
PresentationEx pres = new PresentationEx();
SlideEx slide = pres.getSlides().get_Item(0);
ChartEx c = slide.getShapes().addChart(
ChartTypeEx.ClusteredColumn, 0, 0, 500, 500);
ChartDataEx cd = c.getChartData();
cd.getSeries().clear();
cd.getCategories().clear();
ChartDataCellFactory data =
cd.getChartDataCellFactory();
data.clear(0);
ChartSeriesEx series = cd.getSeries().get_Item(
cd.getSeries().add(data.getCell(
0, 1, 0, "Series 1"), c.getType()));

for(int i = 0; i <=25; i++) {
cd.getCategories().add(data.getCell(0, 0, i+1, "Category "+i));
series.getValues().add(data.getCell(0, 1, i+1, i));
}
pres.write("out.pptx");
}

Hi Shaun,


I have verified the issue shared using Aspose.Slides for Java 6.9.0 on my end and have not been able to reproduce the issue. For your kind reference, I have attached the generated presentation. Please use the specified product version and share with us if there is still an issue.

Many Thanks,


Try to right click on that chart and select “Edit Data”. Normally Excel will load and display the data worksheet, but not with this chart.

Hi Shaun,


Thanks for sharing the additional details. I have been able to reproduce the issue specified and an issue with ID SLIDESJAVA-33706 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,

Hi Shaun,


I like to share that the issue shared has been resolved in Aspose.Slides for Java 7.5.1 hotfix. Please try using the attached sample code to serve the purpose. I will share the product notification with you shortly.

Many Thanks,

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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.