TinyButStrong - the PHP Template Engine
Categories > OpenTBS with DOCX >

Can we generate tables directly in Word .docx ?

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: Satheesh
Date: 2017-01-31
Time: 10:26

Can we generate tables directly in Word .docx ?

Good work on the OpenTBS.
I saw the demos but what I need is to generate
tables directly
number of tables will be determined at runtime
and also the number of columns, rows will be known
only at runtime.
So create the table and stick them in the template .docx
Can you pls point me in the correct direction ?
Thanks all
-- Satheesh
By: Skrol29
Date: 2017-02-02
Time: 20:09

Re: Can we generate tables directly in Word .docx ?


You cannot « create the tables » and stick them using the technical of template.

You have to build a table with the proper TBS tags in order to:
- first merge the columns using parameter "parallel" (see http://www.tinybutstrong.com/opentbs.php?doc#col)
- then merge rows with the usual tag "block=tbs:row"