rtf-templater
rtf-templater copied to clipboard
Support for Tables in RTF
Is it possible to generate table in RTF with dynamic rows and cols?
Hello
No, unfortunately it can not be done.
The problem is that the table will generate an empty row, in which control structure has been placed.
I think there may be a simple workaround, e.g. the row with control structure can be removed after template processing.
I just didn't faced with such problem, so I can't help with that.
I didn't get the empty row part.
If i'm willing to ignore the empty rows and use tables for formatting, Is it possible to dynamically generate a MxN table in RTF like the equivalent of adding M TR tags and N TD tags in html?
I played around with the generation of tables. The rows are generated normally, but cols generation does not work. So, you can generate a table only with dynamic number of rows, like:
--------------------------------------
|<% 5.times do %> col1 | col2 | col3 |
--------------------------------------
<% end %>