NextRow
Row.NextRow property
获取下一个Row
节点.
public Row NextRow { get; }
评论
该方法可用于需要对表格行进行类型访问的情况。如果 a StructuredDocumentTag
节点位于表而不是行中, 它会自动遍历以获取其中包含的行。
例子
展示如何枚举所有表格单元格。
Document doc = new Document(MyDir + "Tables.docx");
Table table = doc.FirstSection.Body.Tables[0];
// 枚举表格的所有单元格。
for (Row row = table.FirstRow; row != null; row = row.NextRow)
{
for (Cell cell = row.FirstCell; cell != null; cell = cell.NextCell)
{
Console.WriteLine(cell.GetText());
}
}
也可以看看
- class Row
- 命名空间 Aspose.Words.Tables
- 部件 Aspose.Words