EvotecIT / OfficeIMO

Fast and easy to use cross-platform .NET library that creates or modifies Microsoft Word (DocX) and later also Excel (XLSX) files without installing any software. Library is based on Open XML SDK
MIT License
289 stars 50 forks source link

Repeat as header row at the top on each page #230

Closed BorisVolkan closed 5 months ago

BorisVolkan commented 5 months ago

Hi,

Does WordTable supports Repeat as header row at the top on each page feature?

PrzemyslawKlys commented 5 months ago

No, but it seems to be pretty easy to add:

image

Basically one needs to add TableHeaderr() to TableRowProperties, for every row to enable it, and remove it to disable.

BorisVolkan commented 5 months ago

But how do I know when page break occurs to enable it?

PrzemyslawKlys commented 5 months ago

I mean you can just enable it on all tables? The Word will take care of it. If there's page break, it will use it, if there isn't - nothing will happen. In Word there's no way to tell on which page you are unless you basically implement what Word does as far as I am aware.

This feature should be very simple to add with minimal effort. We just need a PR.

BorisVolkan commented 5 months ago

Thank you

BorisVolkan commented 5 months ago

RepeatHeaderRowAtTheTopOfEachPage should be applied on FirstRow. (the header) not on a table level. Now it creates page break before table.

BorisVolkan commented 5 months ago

Now it is OK. Thank you.