Table — Aspose.Note FOSS Python API Reference

Class: Table

Package: aspose.note Import: from aspose.note import Table Inherits: CompositeNode

Table — Table class in the Aspose.Note FOSS Python API. Inherits from: CompositeNode.


Properties

PropertyTypeAccessDefaultDescription
Columnslist[TableColumn]Read[]List of column metadata; each TableColumn has .Width (float) and .LockedWidth (bool)
IsBordersVisibleboolRead/WriteTrueWhether table borders are visible
Tagslist[NoteTag]Read[]OneNote tags attached to this table

Usage Example

from aspose.note import Document, Table, TableRow, TableCell, RichText

doc = Document("MyNotes.one")
for table in doc.GetChildNodes(Table):
    print("Column widths:", [col.Width for col in table.Columns])
    print("Borders visible:", table.IsBordersVisible)
    for r, row in enumerate(table.GetChildNodes(TableRow), start=1):
        cells = [
            " ".join(rt.Text for rt in cell.GetChildNodes(RichText)).strip()
            for cell in row.GetChildNodes(TableCell)
        ]
        print(f"Row {r}:", cells)

See Also