previousCell property
Cell.previousCell property
Gets the previous Cell node.
get previousCell(): Aspose.Words.Tables.Cell
Remarks
The method can be used when you need to have typed access to cells of a Row. If a StructuredDocumentTag node is found in a row instead of a cell, it is automatically traversed to get a cell contained within.
Examples
Shows how to enumerate through all table cells.
let doc = new aw.Document(base.myDir + "Tables.docx");
let table = doc.firstSection.body.tables.at(0);
// Enumerate through all cells of the table.
for (let row = table.firstRow; row != null; row = row.nextRow)
{
for (let cell = row.firstCell; cell != null; cell = cell.nextCell)
{
console.log(cell.getText());
}
}
See Also
- module Aspose.Words.Tables
- class Cell