NextRow
Innehåll
[
Dölj
]Row.NextRow property
Får nästaRow
nod.
public Row NextRow { get; }
Anmärkningar
Metoden kan användas när du behöver ha skrivåtkomst till tabellrader. Om a StructuredDocumentTag
noden finns i en tabell istället för en rad, den genomsöks automatiskt för att hämta en rad som finns inuti.
Exempel
Visar hur man räknar igenom alla tabellceller.
Document doc = new Document(MyDir + "Tables.docx");
Table table = doc.FirstSection.Body.Tables[0];
// Räkna igenom alla celler i tabellen.
for (Row row = table.FirstRow; row != null; row = row.NextRow)
{
for (Cell cell = row.FirstCell; cell != null; cell = cell.NextCell)
{
Console.WriteLine(cell.GetText());
}
}
Se även
- class Row
- namnutrymme Aspose.Words.Tables
- hopsättning Aspose.Words