ExcelTable class Tables
An Excel table (a "ListObject") over a rectangular range, a named region with a header row, banded styling, and a filter.
Add one with Sheet.addTable; read existing tables via Sheet.tables.
On save the table is written as xl/tables/tableN.xml, referenced from the
worksheet's <tableParts>.
sheet.addTable(ExcelTable(
name: 'Sales',
from: CellIndex.indexByString('A1'),
to: CellIndex.indexByString('C10'),
style: TableStyle.medium9,
));
Constructors
-
ExcelTable({required String name, required CellIndex from, required CellIndex to, bool headerRow = true, String? style, bool showFirstColumn = false, bool showLastColumn = false, bool showRowStripes = true, bool showColumnStripes = false, List<
String> ? columns}) -
Creates a table spanning the rectangle from
fromtoto(inclusive).
Properties
- columnCount → int
-
Number of columns spanned.
no setter
-
columns
→ List<
String> ? -
Explicit column names. When omitted, names come from the header row (or are
generated as
Column1,Column2, ... when there is no header).final - from → CellIndex
-
Top-left corner of the table (the first header cell when headerRow).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerRow → bool
-
Whether the first row is a header row (default
true). Whenfalse, the table has no header and columns are named from columns or generated.final - name → String
-
The table's unique name (also its display name). Must be unique across the
workbook, begin with a letter or underscore, and contain no spaces.
final
- ref → String
-
The A1-style range covered by the table (e.g.
"A1:C10").no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showColumnStripes → bool
-
Banded (striped) columns.
final
- showFirstColumn → bool
-
Highlight the first column.
final
- showLastColumn → bool
-
Highlight the last column.
final
- showRowStripes → bool
-
Banded (striped) rows. Defaults to
true.final - style → String?
-
Built-in table style name (see TableStyle);
nulluses Excel's default.final - to → CellIndex
-
Bottom-right corner of the table (inclusive).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited