Categories > OpenTBS with DOCX >

Merge table cell row of one column

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Sandeep
Date: 2013-04-16
Time: 15:12

Merge table cell row of one column

Hi,
I am unable to merge table cell in ms docx. my template having 4 columns and 4 rows.

In first column and 1st row : [data.cluster_name;block=w:tr;sub1=assoc;sub2=primary;sub3=programmer;sub4=partner;sub5=trans;when [data.show_dates]==0]
In first column and 2nd row: [data.cluster_name;block=w:tr;sub1=assoc;sub2=primary;sub3=programmer;sub4=partner;sub5=trans;when [data.show_dates]==1]
In first column and 3 row: [data.cluster_name;block=w:tr;sub1=assoc;sub2=primary;sub3=programmer;sub4=partner;sub5=trans;when [data.show_dates]==2]
In first column and 4 row:  [data.cluster_name;block=w:tr;sub1=assoc;sub2=primary;sub3=programmer;sub4=partner;sub5=trans;when [data.show_dates]==3]

PHP Code:    $TBS->MergeField('data',$data);   // $data is an array

$data=array ( [0] => Array
            (
                [show_dates] => 1
                [cluster_name] => test
                [projects] => dummy12
                [compounds] => 696
               )
        [1] => Array
            (
                [show_dates] => 3
                [cluster_name] => test
                [projects] => dummy
                [compounds] => N/A
               )
        [2] => Array
            (
                [show_dates] => 1
                [cluster_name] => test
                [projects] => dummy123
                [compounds] => N/A
               )
        )

Now I want to merge 1st , 2nd and 3rd rows of the first column because cluster_name are same i.e. test and rest of data will be in row.

How can I do this?


Thanks in advance.
By: Skrol29
Date: 2013-04-17
Time: 01:08

Re: Merge table cell row of one column

A new feature has been added in OpenTBS 1.8.0 beta for merging cells vertically.

http://www.tinybutstrong.com/dl.php?f=tbs_plugin_opentbs_beta.zip&s=2

There is an example in the DOCX demo provided with this package.
By: Sandeep
Date: 2013-04-17
Time: 06:12

Re: Merge table cell row of one column

Thanks for your reply soon.

I am getting an error when I am using this plugin i.e. "The Office Open XML file demo_ms_word_2013_04_17 cannot be opened because there are problems with contents".

I don't know why it is coming. Can you please test it at your end?

Thanks in advance.
By: Skrol29
Date: 2013-04-18
Time: 01:39

Re: Merge table cell row of one column

The 'mergecell' operator was not working with block having several sections.
This is now fixed. You can download the last beta version.