CellFormat.ClearFormatting method

Resets to default cell formatting. Does not change the width of the cell.

public void ClearFormatting()


Shows how to combine the rows from two tables into one.

Document doc = new Document(MyDir + "Tables.docx");

// Below are two ways of getting a table from a document.
// 1 -  From the "Tables" collection of a Body node:
Table firstTable = doc.FirstSection.Body.Tables[0];

// 2 -  Using the "GetChild" method:
Table secondTable = (Table)doc.GetChild(NodeType.Table, 1, true);

// Append all rows from the current table to the next.
while (secondTable.HasChildNodes)

// Remove the empty table container.

doc.Save(ArtifactsDir + "Table.CombineTables.docx");

See Also