Categories > OpenTBS with DOCX >

format table while merging block

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: walter
Date: 2015-01-31
Time: 20:58

format table while merging block

Hi,

I don't know if it is possible, but I need to format a table while merging, drawing bottom borders at specific rows.
Is there a way to do that on this template?
[a;block=tbs:row;sub1][a_sub1.val;block=tbs:cell]
Thanks in advance
By: Skrol29
Date: 2015-02-04
Time: 01:01

Re: format table while merging block

Hi,

It should be possible the change the row style but it could be quite complicated.
The best solution is to use conditional sections of blocks.

See http://www.tinybutstrong.com/manual.php#html_conditional
By: walter
Date: 2015-02-05
Time: 15:35

Re: format table while merging block

I found a solution, worked great.
What I did was to specify two keys in the sub-block. Something like this:
[a_sub1;block=tbs:row;sub1][a_sub1_sub1;block=tbs:cell;sub1=cv;sub2=tb;sub3=bb][a_sub1_sub1_sub1.val]
[a_sub1_sub1_sub2.val;att=w:top#w:val][a_sub1_sub1_sub3.val;att=w:bottom#w:val]

This way I can control the top and bottom borders with two matrices with values 'single' or 'none', for example. Those matrices with the same size of the data one.

The only downside is that I had to manually edit my docx document.xml to make sure the properties top and bottom were placed before the cell where this code lies within, between the appropriate tags...

Thanks
By: Skrol29
Date: 2015-02-06
Time: 10:20

Re: format table while merging block

OK, thanks.