Bug 54697 - Can not create tables
Summary: Can not create tables
Status: RESOLVED WORKSFORME
Alias: None
Product: POI
Classification: Unclassified
Component: XSLF (show other bugs)
Version: 3.9-FINAL
Hardware: PC All
: P2 critical with 12 votes (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-14 11:53 UTC by Johan Walter
Modified: 2016-03-23 21:52 UTC (History)
0 users



Attachments
A screen dump of Microsoft Powerpoint (85.93 KB, image/png)
2013-03-14 11:53 UTC, Johan Walter
Details
The pptx file (24.43 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2013-03-14 11:53 UTC, Johan Walter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Walter 2013-03-14 11:53:07 UTC
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.
Comment 1 Johan Walter 2013-03-14 11:53:49 UTC
Created attachment 30051 [details]
The pptx file
Comment 2 jlrice9673 2013-05-16 20:01:27 UTC
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.
Comment 3 Andreas Beeker 2013-11-04 00:02:28 UTC
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 ...
Comment 4 Felix Kurth 2014-05-27 09:17:35 UTC
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)
Comment 5 Nick Burch 2014-05-27 13:40:25 UTC
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!
Comment 6 Andreas Beeker 2016-03-23 21:52:37 UTC
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.