senny / sablon

Ruby Document Template Processor based on docx templates and Mail Merge fields.
MIT License
446 stars 128 forks source link

Html table default style #113

Closed MO-Osama closed 5 years ago

MO-Osama commented 6 years ago

i am using Sablon.content with html table , the resulted table doesn't take the default table styling, so the header gets repeated across pages, is there's a way to set a default table style (which doesn't repeat header across pages) or create a word style dynamically and set it to the table ?

stadelmanma commented 6 years ago

@MO-Osama Hi glad to hear you are using Sablon! I haven't had a chance to test this yet since I'm lacking MS word currently but adding style="tblStyle: stylename" to the <table> tag will do the trick I think.

MO-Osama commented 6 years ago

@stadelmanma thanks for your response, that actually had the same effect of using Sablon.configure , the style is highlighted in MS Word, however, it's not applied, so if click on the highlighted style, it gets applied and the repeated header disappears ,

as a workaround i made the header row as a regular with custom styling, but applying a custom style would be a great feature.