Represents an Excel-style structured data table over a range of cells.
Object
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public class TableThe columns of the table, in left-to-right order.
public IReadOnlyList<Documents.Spreadsheet.TableColumn> Columns { get; }
| Type | Description |
|---|---|
| IReadOnlyList<Documents.Spreadsheet.TableColumn> | The columns of the table, in left-to-right order. |
The data body range — the table range minus the header row (if shown) and totals row (if shown).
public Documents.Spreadsheet.RangeRef DataBodyRange { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef | The data body range — the table range minus the header row (if shown) and totals row (if shown). |
Friendly display name; defaults to Name if not set explicitly.
public string DisplayName { get; set; }
| Type | Description |
|---|---|
| string | Friendly display name; defaults to Name if not set explicitly. |
Auto-filter that drives header dropdowns and persists filter state.
public Documents.Spreadsheet.AutoFilter Filter { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.AutoFilter | Auto-filter that drives header dropdowns and persists filter state. |
The range of the header row, or null if ShowHeaderRow is false.
public Documents.Spreadsheet.RangeRef? HeaderRowRange { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef? | The range of the header row, or null if ShowHeaderRow is false. |
Highlights the first column (typically a label column).
public bool HighlightFirstColumn { get; set; }
| Type | Description |
|---|---|
| bool | Highlights the first column (typically a label column). |
Highlights the last column (typically a totals column).
public bool HighlightLastColumn { get; set; }
| Type | Description |
|---|---|
| bool | Highlights the last column (typically a totals column). |
The unique table name used in structured references (e.g. =SUM(Sales[Amount])). Must be unique within the workbook. Set by the constructor; rename via this setter.
public string Name { get; set; }
| Type | Description |
|---|---|
| string | The unique table name used in structured references (e.g. =SUM(Sales[Amount])). Must be unique within the workbook. Set by the constructor; rename via this setter. |
The full range of the table including header and totals rows.
public Documents.Spreadsheet.RangeRef Range { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef | The full range of the table including header and totals rows. |
Whether banded column striping is applied. Defaults to false.
public bool ShowBandedColumns { get; set; }
| Type | Description |
|---|---|
| bool | Whether banded column striping is applied. Defaults to false. |
Whether banded row striping is applied. Defaults to true.
public bool ShowBandedRows { get; set; }
| Type | Description |
|---|---|
| bool | Whether banded row striping is applied. Defaults to true. |
Whether the filter buttons render on header cells. Defaults to true.
public bool ShowFilterButton { get; set; }
| Type | Description |
|---|---|
| bool | Whether the filter buttons render on header cells. Defaults to true. |
Whether the header row is shown. Defaults to true. Toggling at runtime is a structural operation matching Excel's behavior: - true → false: clears the current top row's cells (values + formula + format), shrinks Range upward by one row, and disables ShowFilterButton. - false → true: expands Range upward by one row, writes default header values (each Name) into the new top row, and enables ShowFilterButton.
public bool ShowHeaderRow { get; set; }
| Type | Description |
|---|---|
| bool | Whether the header row is shown. Defaults to true. Toggling at runtime is a structural operation matching Excel's behavior: - true → false: clears the current top row's cells (values + formula + format), shrinks Range upward by one row, and disables ShowFilterButton. - false → true: expands Range upward by one row, writes default header values (each Name) into the new top row, and enables ShowFilterButton. |
Whether the totals row is shown. Defaults to false. Toggling at runtime is a structural operation matching Excel's behavior: - false → true: Range expands by one row downward, "Total" is written into the new row's first column, and any column-level TotalsCalculation values are applied as SUBTOTAL formulas. - true → false: the totals row's cells (values + formulas + format) are cleared and Range shrinks back by one row.
public bool ShowTotals { get; set; }
| Type | Description |
|---|---|
| bool | Whether the totals row is shown. Defaults to false. Toggling at runtime is a structural operation matching Excel's behavior: - false → true: Range expands by one row downward, "Total" is written into the new row's first column, and any column-level TotalsCalculation values are applied as SUBTOTAL formulas. - true → false: the totals row's cells (values + formulas + format) are cleared and Range shrinks back by one row. |
The first visible cell in the table's range.
public Documents.Spreadsheet.CellRef Start { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellRef | The first visible cell in the table's range. |
Built-in or named custom table style — e.g. TableStyleMedium2, TableStyleLight15. Defaults to TableStyleMedium2. Set to null to opt out of styling.
public string TableStyle { get; set; }
| Type | Description |
|---|---|
| string | Built-in or named custom table style — e.g. TableStyleMedium2, TableStyleLight15. Defaults to TableStyleMedium2. Set to null to opt out of styling. |
The range of the totals row, or null if ShowTotals is false.
public Documents.Spreadsheet.RangeRef? TotalsRowRange { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.RangeRef? | The range of the totals row, or null if ShowTotals is false. |
The sheet this table is on.
public Documents.Spreadsheet.Worksheet Worksheet { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Worksheet | The sheet this table is on. |
Removes the table abstraction but leaves the cell content untouched.
public void ConvertToRange()Removes the table. Cell content is preserved by default; pass true to also clear cells.
public void Delete(bool clearCells)
| Type | Name | Description |
|---|---|---|
| bool | clearCells |
Resizes the table to a new range. Columns are added or trimmed accordingly.
public void Resize(Documents.Spreadsheet.RangeRef newRange)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | newRange |
Sorts the table by a single column. column is relative to the table (0 = first column of the table).
public void Sort(SortOrder order, int column)
| Type | Name | Description |
|---|---|---|
| SortOrder | order | |
| int | column |
Sorts the table by a single column. column is relative to the table (0 = first column of the table).
public void Sort(Documents.Spreadsheet.SortKey[] keys)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.SortKey[] | keys |