String dataDir = Utils.getSharedDataDir(GetCellTextFromRowOfTable.class) + "tables/";
// Load the document into Aspose.Note.
Document document = new Document(dataDir + "Sample1.one");
// Get a list of table nodes
List
nodes = (List) document.getChildNodes(Table.class);
for (Table table : nodes) {
// Iterate through table rows
for (TableRow row : table) {
// Get list of TableCell nodes
List cellNodes = (List) row.getChildNodes(TableCell.class);
// iterate through table cells
for (TableCell cell : cellNodes) {
// Retrieve text
List textNodes = (List) cell.getChildNodes(RichText.class);
StringBuilder text = new StringBuilder();
for (RichText richText : textNodes) {
text = text.append(richText.getText().toString());
}
// Print text on the output screen
System.out.println(text);
}
}
}