UNIT6-open / TemplateEngine.Docx

Smart docx template engine for .NET
Other
407 stars 137 forks source link

Remove holder if content empty #24

Open anatoly-kryzhanovsky opened 7 years ago

anatoly-kryzhanovsky commented 7 years ago

i'm create word document by template template contains table and list (and some other text data). the table contains several repeated rows. table:

Header1 | value1
Header2 | value2
Header3 | value3

list: 1. value

which must translate into: table:

Header1| row1-value1
Header2| row1-value2
Header3| row1-value3
------------------------
Header1| row2-value1
Header2| row2-value2
Header3| row2-value3
------------------------
...

(yes, in table header places in first column, but not row)

list:

1.value 1
2.value 2
3.value 3
...

all work fine, except one small things - if table or list does not contains any row in result document i see template data... how i can remove this data from result document if repeated data are empty?

coyot commented 7 years ago

+1 for a request

PhilipDavidPlant commented 7 years ago

+1 for a request

rpaschoal commented 7 years ago

+1 for a request

sinannar commented 7 years ago

+1 for a request

v-knyazev commented 7 years ago

+1! That feture will rock

ildarnm commented 7 years ago

+1

abatar1 commented 7 years ago

Now template removes when table doesn't contain any row. Also, any content now contains Hide() method, which you can manually hide content in result document.

coyot commented 7 years ago

Can you push the nuget package for us then?