Tables
Story.Tables property
Получает коллекцию таблиц, которые являются непосредственными дочерними элементами истории.
public TableCollection Tables { get; }
Примеры
Показывает, как удалить первую и последнюю строки всех таблиц в документе.
Document doc = new Document(MyDir + "Tables.docx");
TableCollection tables = doc.FirstSection.Body.Tables;
Assert.AreEqual(5, tables[0].Rows.Count);
Assert.AreEqual(4, tables[1].Rows.Count);
foreach (Table table in tables.OfType<Table>())
{
table.FirstRow?.Remove();
table.LastRow?.Remove();
}
Assert.AreEqual(3, tables[0].Rows.Count);
Assert.AreEqual(2, tables[1].Rows.Count);
Смотрите также
- class TableCollection
- class Story
- пространство имен Aspose.Words
- сборка Aspose.Words