Bug 60633 - Apache POI 3.13 generated powerpoint file cannot be opened
Summary: Apache POI 3.13 generated powerpoint file cannot be opened
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS X 10.1
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-24 02:28 UTC by suhaastalak
Modified: 2018-04-02 00:10 UTC (History)
0 users



Attachments
The image shows the error that is seen while opening the pptx file (14.16 KB, image/png)
2017-01-24 02:28 UTC, suhaastalak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description suhaastalak 2017-01-24 02:28:20 UTC
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()
Comment 1 Javen O'Neal 2017-01-24 03:05:54 UTC
> File pptFile = File.createTempFile("fileName", ".ppt")
.pptx?
Comment 2 Nick Burch 2017-01-24 05:59:37 UTC
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?
Comment 3 Andreas Beeker 2018-04-02 00:10:17 UTC
no user input for more than a year ... closing this now.