I’m trying to create a table in word.
I have a header row … and specified the cellformat.width for every column in the headeer row.
For the contents of subsequent rows, I realised that if I do not set the cellformat.width the width are not the same as that of the header row.
Is it necessary to set the width for every cell in every row in the table ?
How to enable the cells in the 2nd and subsequent rows to use the same width as the header row ?
Thank you for considering Aspose.
If you are using DocumentBuilder to build the table, you should look at the previous row cells and set cell width every time anew. Another approach is creating an array of cell width values and using it to set cell width when inserting every new cell.
If you are building the table directly by creating and adding the nodes, you can create one instance of Row with cells that have appropriate widths and then clone this instance before adding to Table.