Created attachment 30050 [details] A screen dump of Microsoft Powerpoint When running the Tutorial4.java code: http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial4.java Only a small square is shown when opening the file in Microsoft Power Point 2010.
Created attachment 30051 [details] The pptx file
The XSLFTable getCTTable() method is working as expected and the XML object is correct. But it seems as though the XML is not getting added to the Slide XML object.
This works for me with the current trunk (= 3.10-beta3) with Libre Office 4 and MS PP Viewer 14. The generated files (attached table.pptx vs. my newly generated one) differ in the slide1.xml - e.g. one of the differences is, that there's no table row element (a:tr) after the table grid (a:tblGrid) in the attached table.pptx. Things to try/check: - try including the ooxml-schemas-1.1.jar (see http://poi.apache.org/overview.html#components) - which xmlbeans/xml-parser/jdk version do you use? - do you use the tutorial4 code with just the recommended jars (opposed to your application jars), if not, please give it a try ...
Adding ooxml-schemas-1.1.jar to the classpath solves the problem. Please make a note about that to the documentation and to Tutorial4.java Why is this lib not a maven dependency? (http://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xslf/usermodel/Tutorial4.java)
The preferred way is to write a unit test that uses the relevant bit of the ooxml schema, that will then get the class included in the poi-ooxml-schemas jar The maven dependency is on the smaller jar, rather than the large one, but you can explicitly change that yourself. It's detailed in the FAQ and Components pages If you could work up a unit test to solve this by default, that'd be great!
I've checked Tutorial4 against the usual poi dependencies of 3.14 without ooxml-schemas-1.3.jar. So I'm closing this now as worksforme.