Created attachment 34668 [details] The image shows the error that is seen while opening the pptx file Apache poi - 3.13 is being used to generate a pptx file. The generated file cannot be opened: when attempted to open, the file displays that it has a problem with the content and offers an option to "repair". After clicking on "repair" a couple of times, the file does open up eventually. XSLFTableCell cell XSLFTextParagraph p XSLFTextRun line XSLFTable tbl = slide.createTable(); tbl.setAnchor(new Rectangle(X, Y, WIDTH, HEIGHT)); XSLFTableRow headerRow = tbl.addRow(); headerRow.setHeight(45); //Loop through the data collection and populate rows and columns. for(int i = 0; i < numberOfCols; i++) { XSLFTableCell th = headerRow.addCell(); p = th.addNewTextParagraph(); p.setTextAlign(TextAlign.CENTER); line = p.addNewTextRun(); .....} for (int item=0; item < 8; item++) { XSLFTableRow itemRow = tbl.addRow();.....} //finally write the file File pptFile = File.createTempFile("fileName", ".ppt") FileOutputStream out = new FileOutputStream(pptFile) ppt.write(out) out.close()
> File pptFile = File.createTempFile("fileName", ".ppt") .pptx?
Apache POI 3.13 is about 18 months old now, and a lot of bugs have been fixed since then - see http://poi.apache.org/changes.html#3.13 . Can you please try with a more recent version of POI, and see if the issue still remains?
no user input for more than a year ... closing this now.