With OpenTBS you can merge OpenOffice - LibreOffice and Ms Office documents with PHP using the TinyButStrong template engine. Simple use OpenOffice - LibreOffice or Ms Office to edit your templates : DOCX, XLSX, PPTX, ODT, OSD, ODP and other formats. That is the Natural Template philosophy.
Hyperlinks in Excel template are recorded in element. This PR adds support for keeping updated correctly when rows/cells are added as a result of the calls to MergeBlock.
Merged cells in Excel template are records in element. This PR adds similar support for element.
This kind of support only works for merged cells and hyperlinks that are not in the same row as the row that has block=tbs:row (and similarly, not in the same column as the column that hasblock=tbs:cell).
A new ope was introduced to support this case, that's ope=mergecells.
Example:
in a row that has block=tbs:row, a cell with ope=mergecells;cols=2 would generate a merged cell (containing 2 columns) in each added row
in a row that has block=tbs:cell, a cell with ope=mergecells;rows=3 would generate a merged cell (containing 3 rows) in each added column
Parameters rows and cols can be omitted. The default value is the value of the current field. This feature allows the dimensions of the merged cell to be determined dynamically.
Example:
in a row that has block=tbs:row, a cell with [block1.field2;ope=mergecells;rows=1] and block1.field2 has value 4 would generate a merged cell (containing 4 columns) in each added row
in a row that has block=tbs:cell, a cell with [block1.field2;ope=mergecells;cols=1] and block1.field2 has value 5 would generate a merged cell (containing 5 rows) in each added column
Hyperlinks in Excel template are recorded in element. This PR adds support for keeping updated correctly when rows/cells are added as a result of the calls to
MergeBlock
.Merged cells in Excel template are records in element. This PR adds similar support for element.
This kind of support only works for merged cells and hyperlinks that are not in the same row as the row that has
block=tbs:row
(and similarly, not in the same column as the column that hasblock=tbs:cell
).A new ope was introduced to support this case, that's
ope=mergecells
.Example:
block=tbs:row
, a cell withope=mergecells;cols=2
would generate a merged cell (containing 2 columns) in each added rowblock=tbs:cell
, a cell withope=mergecells;rows=3
would generate a merged cell (containing 3 rows) in each added columnParameters
rows
andcols
can be omitted. The default value is the value of the current field. This feature allows the dimensions of the merged cell to be determined dynamically.Example:
block=tbs:row
, a cell with[block1.field2;ope=mergecells;rows=1]
andblock1.field2
has value 4 would generate a merged cell (containing 4 columns) in each added rowblock=tbs:cell
, a cell with[block1.field2;ope=mergecells;cols=1]
andblock1.field2
has value 5 would generate a merged cell (containing 5 rows) in each added column