Class ExcelTable
An Excel table (a range formatted with "Format as Table", stored as a ListObject): its name, its position on its sheet and its columns.
public sealed class ExcelTable
- Inheritance
-
ExcelTable
- Inherited Members
Remarks
Row and column positions are zero-based and include the header and totals rows.
Properties
ColumnNames
Gets the table's column names, in column order.
public IReadOnlyList<string> ColumnNames { get; }
Property Value
FirstColumn
Gets the zero-based index of the table's first column.
public int FirstColumn { get; }
Property Value
FirstRow
Gets the zero-based row of the table's first row: its header row, when it has one.
public int FirstRow { get; }
Property Value
HeaderRowCount
Gets the number of header rows: 1, or 0 when the table's header row is turned off.
public int HeaderRowCount { get; }
Property Value
LastColumn
Gets the zero-based index of the table's last column.
public int LastColumn { get; }
Property Value
LastRow
Gets the zero-based row of the table's last row: its totals row, when it has one.
public int LastRow { get; }
Property Value
Name
Gets the table's name, as formulas refer to it (its display name).
public string Name { get; }
Property Value
Ref
Gets the table's range in A1 notation, header and totals rows included, such as C4:E8.
public string Ref { get; }
Property Value
Sheet
Gets the sheet that holds the table.
public IExcelSheet Sheet { get; }
Property Value
StyleName
Gets the name of the table's style, such as TableStyleMedium2, or null when the table has none.
public string? StyleName { get; }
Property Value
TotalsRowCount
Gets the number of totals rows: 1 when the table shows a totals row, otherwise 0.
public int TotalsRowCount { get; }
Property Value
Methods
AsSheet()
Gets a sheet that reads only this table: its header row first (when it has one), then its data rows without the totals row, each cut to the table's columns.
public IExcelSheet AsSheet()
Returns
- IExcelSheet
A sheet bounded to this table.