I want to be able to replace an embedded .xlsx in a .pptx.
First step I did was create a simple .pptx file in Powerpoint which contains one slide and imported a spreadsheet from Excel in it.
I tried to replace the embedded .xlsx file but ran in to some trouble with corrupted files. Then found out that just doing this causes the .pptx to be corrupt:
- Code: Select all
PresentationMLPackage ppt = PresentationMLPackage.load(new File("input.pptx"));
ppt.save(new File("output.pptx"));