Page 1 of 1

How to embed ole object inside table cell

PostPosted: Wed Aug 23, 2017 5:48 am
by chandu.penjarla
Hi
My requireent is to create table using docx4j and in one of table cell i would be embeding ole object. I could not find a way how do i achieve this. There were posts which states to use OledocxHelper class. It has embed function that is taking index parameter to tell where to insert. But it does not serve my purpose.
i am looking for any api that returns OLe object which i could add to paraand then add para to table cel.l.
I cot find any java docs for OleDocxHelper to check if any other suitable methods. I am new to docx4j API any help is appreciated

Re: How to embed ole object inside table cell

PostPosted: Wed Aug 23, 2017 10:52 pm
by jason
The non-deprecated link/embed methods return an R (run) object which you can put in a P in a Tc.

What type of content are you embedding?

if its an Office document, there are also the embedOffice methods, which also return an R (run) object which you can put in a P in a Tc.

Re: How to embed ole object inside table cell

PostPosted: Fri Aug 25, 2017 1:57 am
by chandu.penjarla
Hi Jason
Thanks for the response. We are on plutext 3.2 version where that api is not available. Is there any other way to achieve this requirement other than using docxhelper.
We are embedding all types of files.

Re: How to embed ole object inside table cell

PostPosted: Fri Aug 25, 2017 8:25 pm
by jason
You can use one of the other methods to insert at index, then simply take that P and put it in your Tc.

Or you could upgrade to 3.3.