You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After exporting and viewing the content in Word, we noticed that the table breaks at the end of a page. We attempted to display the header on every new page using the tableheader:true property, but this resulted in the table being shifted to the next page.
It should be useful if there is property that will repeat header of table in every new page without shiftng table to new page.
new Document({
sections: [
{
children: [
new Paragraph({ children: [new TextRun({ text: 'Table title', bold: true })] }),
new Table({
rows: [
new TableRow({
children: [
new TableCell({ children: [new Paragraph('Header1')] }),
new TableCell({ children: [new Paragraph('Header2')] }),
new TableCell({ children: [new Paragraph('Header3')] })
],
tableHeader: true
}),
new TableRow({
children: [
new TableCell({ children: [new Paragraph('Sed quis maximus sem, a porta tellus. Etiam nec leo molestie turpis suscipit blandit. Aenean eget purus eget massa pretium suscipit id nec nunc. Mauris ligula massa, dictum sed est in, venenatis mattis lacus')] }),
new TableCell({ children: [new Paragraph('Praesent a vestibulum enim, sit amet consectetur est. Nunc suscipit tellus sed lobortis iaculis. Nulla facilisi. Fusce convallis eget ligula a aliquam. Pellentesque habitant morbi tristique senectus et netus')] }),
new TableCell({ children: [new Paragraph('Praesent a vestibulum enim, sit amet consectetur est. Nunc suscipit tellus sed lobortis iaculis. Nulla facilisi. Fusce convallis eget ligula a aliquam. Pellentesque habitant morbi tristique senectus et netus')] })
]
}),
new TableRow({
children: [
new TableCell({ children: [new Paragraph('Sed quis maximus sem, a porta tellus. Etiam nec leo molestie turpis suscipit blandit. Aenean eget purus eget massa pretium suscipit id nec nunc. Mauris ligula massa, dictum sed est in, venenatis mattis lacus')] }),
new TableCell({ children: [new Paragraph('Praesent a vestibulum enim, sit amet consectetur est. Nunc suscipit tellus sed lobortis iaculis. Nulla facilisi. Fusce convallis eget ligula a aliquam. Pellentesque habitant morbi tristique senectus et netus')] }),
new TableCell({ children: [new Paragraph('Praesent a vestibulum enim, sit amet consectetur est. Nunc suscipit tellus sed lobortis iaculis. Nulla facilisi. Fusce convallis eget ligula a aliquam. Pellentesque habitant morbi tristique senectus et netus')] })
]
})
]
})
]
}
]
})
Actual result:
Expected result:
The text was updated successfully, but these errors were encountered:
After exporting and viewing the content in Word, we noticed that the table breaks at the end of a page. We attempted to display the header on every new page using the
tableheader:true
property, but this resulted in the table being shifted to the next page.It should be useful if there is property that will repeat header of table in every new page without shiftng table to new page.
Actual result:
Expected result:
The text was updated successfully, but these errors were encountered: