tables property
Story.tables property
Gets a collection of tables that are immediate children of the story.
get tables(): Aspose.Words.Tables.TableCollection
Examples
Shows how to remove the first and last rows of all tables in a document.
let doc = new aw.Document(base.myDir + "Tables.docx");
let tables = doc.firstSection.body.tables.toArray();
expect(tables[0].rows.count).toEqual(5);
expect(tables[1].rows.count).toEqual(4);
for (var table of tables)
{
table.firstRow?.remove();
table.lastRow?.remove();
}
expect(tables[0].rows.count).toEqual(3);
expect(tables[1].rows.count).toEqual(2);
See Also
- module Aspose.Words
- class Story