Powerpoint found unreadable content - opening pptx which is created using Aspose

Hi,

I have a pptx file “Presentation1.pptx” with a single slide and a chart in it. I have tried to read the file and print the chart name and then save the pptx in another location as “AsposeChartMoodified.pptx”. I have attached the files for your reference. The issue is that when I try to open the file using Microsoft Office 2007, I get an error saying “Powerpoint found unreadable content in AsposeChartMoodified.pptx. Do you want to recover the contents of this presentation?” Once I click YES, it gets opened correctly.

Can you kindly let me know how to save the pptx without any error as the unreadable data. I have provided the code and all the files used as attachments.

public void editChart(String chartDataFileName, String PPTFileName) {

// XMLParser xmlParser = new XMLParser();
// ChartServiceDAO chartserviceDAO;
// chartserviceDAO = xmlParser.parseXML(chartDataFileName);
// ArrayList alCategoryBean = chartserviceDAO
// .getCategoryBeanList();

// Instantiate PresentationEx class that represents PPTX file
PresentationEx pres = new PresentationEx(PPTFileName);
ChartEx chart = null;
for (int i = 0; i < pres.getSlides().getCount(); i++) {
// Access slides
SlideEx sld = pres.getSlides().get_Item(i);
// Add chart with default data
for (int j = 0; j < sld.getShapes().getCount(); j++) {
ShapeEx sh = sld.getShapes().get_Item(j);
if (sh instanceof ChartEx) {
chart = (ChartEx) sh;
System.out.println("CharEx Name : "+chart.getName());
// updateChart(chart, alCategoryBean);

}

}
}

// Save presentation with chart
pres.write(“D:\kalyan\AsposeChartMoodified.pptx”);
System.out.println(“Completed … D:\kalyan\AsposeChartMoodified.pptx”);


}

Kindly reply as soon as possible.



Thanks & Regards
Gaurang.

Hi Gaurang,

Thanks for inquiring Aspose.Slides.

I have observed the presentation files shared by you and have tried opening the presentation in PowerPoint 2010. I have not been able to observe the issue specifed on my end. Secondly, I have observed that you are using Aspose.Slides for Java 7.8.0 on your end. I suggest that you may please try using Aspose.Slides for Java 8.0.0 on your end. If there is still an issue then please share the complete PowerPoint version used on your end to reproduce the issue.

Many Thanks,

Hi Mudassir,

Thank you for your quick reply. I used the Aspose.Slides for Java 8.0.0 version and the pptx file created is opening without any issue. Thanks a lot for your help.

Thanks & Regards,
Gaurang.