Working with table that already exists in a Word template


#1

hi.

in my existing applications, i create Word documents from Word templates. and those word templates typically contain bookmarks and tables. those tables are pre-formatted and usually include the header row and a single blank data row. i move to a bookmark within a table, write some data, move to the next cell, write some data, move to the next cell, etc. when i get to the end of the row, i create the next row.

now i am trying to use Aspose.Word with my existing Word templates. however, i run into a variety of problems.
-after i use MoveToCell through the first row of my table, i get a problem when i use EndRow/InsertCell to create the next row. (“Cannot end a row while not building a table.”)
-after i use MoveToCell through the first row of my table, i get a problem when i use MoveToCell to create the next row. (“Cannot find a row with the specified index.”)
- when i use InsertCell for each row of my table, i find that the new rows do not maintain the column widths of the existing rows.

can i get Aspose.Word to work with my existing Word template? or will i be forced to recreate these tables from scratch?


#2

Thanks for the report. You are correct, inserting more cells or rows into an existing table is not really possible at the moment. This feature request is already on our task list, it might be implemented within a month or so.