PreviousRow

Row.PreviousRow property

Ottiene il precedenteRow nodo.

public Row PreviousRow { get; }

Osservazioni

Il metodo può essere utilizzato quando è necessario disporre di accesso tipizzato alle righe della tabella. Se a StructuredDocumentTag il nodo si trova in una tabella invece che in una riga, viene automaticamente attraversato per ottenere una riga in esso contenuta.

Esempi

Mostra come enumerare tutte le celle della tabella.

Document doc = new Document(MyDir + "Tables.docx");
Table table = doc.FirstSection.Body.Tables[0];

// Enumera tutte le celle della tabella.
for (Row row = table.FirstRow; row != null; row = row.NextRow)
{
    for (Cell cell = row.FirstCell; cell != null; cell = cell.NextCell)
    {
        Console.WriteLine(cell.GetText());
    }
}

Guarda anche