Append new row to an existing table


I have a table that has a header defined in Word and one row that is blank. I have a bookmark marking the first cell in the table so I can jump straight to it. The table has 2 rows and 7 columns.

I test for the row being the last row and if so I want to insert another row to take more data at the end of the table rows.

if (row.IsLastRow)


Row rr = new Row(doc);


for (int iCnt=1;iCnt <= 6;iCnt++)


Cell cl = new Cell(doc);





This all works BUT the added rows do not appear in Word when the document is opened. The last rows do not show any cells or text so I beleive that the document is not well formed. What am I doing wrong?



The cells you are inserting have zero width by default and therefore could not be seen.

The following code will work much better in your case:

if (row.IsLastRow)


Row rr = (Row)row.Clone(true);



Best regards,



That did the job beautifully!

And thanks for the prompt reply - now I can deliver this to my client tomorrow!!!