Tables topic
An ExcelTable (an Excel table / ListObject) turns a cell range into a
structured, named region with a styled header row and a built-in filter dropdown.
Tables in an opened file are read back through Sheet.tables.
sheet.addTable(ExcelTable(
name: 'Sales',
from: CellIndex.indexByString('A1'), // header row
to: CellIndex.indexByString('C13'),
style: TableStyle.medium9,
));
for (final t in sheet.tables) {
print(t.name);
}
Column names come from the header row when present, or are generated and
de-duplicated otherwise. Pick a look with the TableStyle constants
(light* / medium* / dark*), or pass style: null for an unstyled table.
Classes
- ExcelTable Tables
- An Excel table (a "ListObject") over a rectangular range, a named region with a header row, banded styling, and a filter.
- TableStyle Tables
-
A few common built-in table style names, for convenience. Any valid Excel
style name string (e.g.
'TableStyleLight9','TableStyleDark3') also works as ExcelTable.style.