There are two methods that you can use to set column to merged column.
$tableprop.mergeColumns(int number)
When you put the statement in to a column, it will be set as merged column in a specified number.
For example:
Template Code:
Project | $tableprop.mergeColumns($Package.size())Packages |
---|---|
#forcol($p in $Package)$p.name#endcol |
Output:
$tableprop.mergeColumns(String stringNumber)
When you put the statement in to a column, it will be set as merged column in a specified string of number.
For example:
Template Code:
Project | $tableprop.mergeColumns(“3”)Packages |
---|---|
#forcol($p in $Package)$p.name#endcol |
Output:
See Creating Merged Column Horizontally for DOCX.
Note
The number of cells will be increased by the value in mergeColumns.
For example:
Template code #1:
$tableprop.mergeColumns("5")Package | ||
#forcol($p in $Package)$p.name#endcol |
In case there are three packages, the output will be:
Template code #2:
$tableprop.mergeColumns("5")Package | ||
Output: