LastRow
Table.LastRow property
Returns the last Row node in the table.
public Row LastRow { get; }
Examples
Shows how to remove the first and last rows of all tables in a document.
Document doc = new Document(MyDir + "Tables.docx");
TableCollection tables = doc.FirstSection.Body.Tables;
Assert.That(tables[0].Rows.Count, Is.EqualTo(5));
Assert.That(tables[1].Rows.Count, Is.EqualTo(4));
foreach (Table table in tables.OfType<Table>())
{
table.FirstRow?.Remove();
table.LastRow?.Remove();
}
Assert.That(tables[0].Rows.Count, Is.EqualTo(3));
Assert.That(tables[1].Rows.Count, Is.EqualTo(2));
See Also
- class Row
- class Table
- namespace Aspose.Words.Tables
- assembly Aspose.Words