Hi
Thanks for
your request. I think that you can use DocumentBuilder class to achieve this.
You should move to the cell, and then get current row and current table. Add
some rows to table and fill cells. For example see the following code.
Document doc = new
Document(@"337_101645_kirkholt\in.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToBookmark("test");
//get current
cell
Cell parentCell = builder.CurrentParagraph.ParentNode as Cell;
//get current
row
Row parentRow =
parentCell.ParentRow;
//get current
table
Table parentTable =
parentRow.ParentTable;
//add 10 rows
to table
for (int
i = 0; i < 10; i++)
{
parentTable.Rows.Add(parentRow.Clone(true));
}
//fill cels
for (int
i = 0; i < parentTable.Rows.Count; i++)
{
for (int j = 0; j < parentTable.Rows[i].Cells.Count;
j++)
{
builder.MoveToCell(0, i, j, 0);
builder.Write(String.Format("Row index = {0}; Cell index = {1}",
i.ToString(), j.ToString()));
}
}
//save
document
doc.Save(@"337_101645_kirkholt\out.doc");
I hope that
this will help you.
Best
regards.