With the help of Spire.Doc, developers can easily add new table to the word document in C# and VB.NET. Spire.Doc offers a method of table.AddRow() to enable developers to insert the new rows easily with styles or not at the bottom of the table. It also offers a method of table.Rows.Insert(int index, TableRow row) to enable developers to insert a new row at any index as we want. This article will focus on demonstrating how to add new rows to an existing word table in C#.
Firstly, please view the original word table:
Note: Before Start, please download the latest version of Spire.Doc and add Spire.Doc.dll in the bin folder as the reference of Visual Studio.
The most quickly and simplest way to insert multiple rows into a table in Word is right click. Here take Table A for example. To add a row or column, click inside a table cell. Right-click on the mouse, then click Insert. Select one of the following: Columns to the Left.
Step 1: Create a new word document and load the document from file.
Step 2: Get the first table from the word document.
Step 3: Insert a new row as the third row.
How To Add A Row In Word Online
Step 4: Add two rows to the table at the end, one with format, the other one without format.
Step 5: Save the document to file and set its file format.
Effective screenshot after adding rows to the word table:
How To Make Multiple Lines In Word
Microsoft Word Columns And Rows
Full codes: