Categories > OpenTBS with DOCX >

One row of table with several cells and one of the cells with multiple rows

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Salavat
Date: 2015-06-25
Time: 23:22

One row of table with several cells and one of the cells with multiple rows

I am trying to construct a table per record, the table will have header row, which is constant, placed in template. The next row of table is filled with merging, and the last cell in that row is divided into two columns and will contain several rows (number of rows depends on the data being merged).
Something like this:
____________________________
_______|_________|___________
             |                |______|_____
             |                |______|_____
_______|_________|______|_____

Data structure is as follows:
Array(
   [0] => array('title'=>'subject Name',
                         'code'=>'subject Code',
                         'description'=>'subject Description',
                         'workload'=>array(
                                          [0]=>array('title'=>'lab',
                                                              'hour'=>'15'),
                                          [1]=>array('title'=>'exam',
                                                              'hour'=>'4')
                                          )
               ),
and so on....
)

I failed to have multiple rows in one cell keeping other cells having only one row.
Is there any idea how to fullfil this?

Thanks in advance.
By: Skrol29
Date: 2015-06-25
Time: 23:43

Re: One row of table with several cells and one of the cells with multiple rows

Hi Salavat,

I simple solution is to have another table in the last cell.

____________________________
|_______|_________|__________|
|_______|_________|____*_____|

* put a table here and do an automatic sub-block for merging data under "workload".
By: Salavat
Date: 2015-06-26
Time: 11:26

Re: One row of table with several cells and one of the cells with multiple rows

Thank you!