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
| Property | Type | Access | Default | Description |
|---|---|---|---|---|
Columns | list[TableColumn] | Read | [] | List of column metadata; each TableColumn has .Width (float) and .LockedWidth (bool) |
IsBordersVisible | bool | Read/Write | True | Whether table borders are visible |
Tags | list[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)