Represents a sheet in a spreadsheet.
Object
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public class WorksheetGets the auto filter for this sheet. Always non-null. Set its Range property to enable or disable.
public Documents.Spreadsheet.AutoFilter AutoFilter { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.AutoFilter | Gets the auto filter for this sheet. Always non-null. Set its Range property to enable or disable. |
Gets the collection of cells in the sheet.
public Documents.Spreadsheet.CellStore Cells { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellStore | Gets the collection of cells in the sheet. |
Gets the list of charts associated with the sheet.
public IReadOnlyList<Documents.Spreadsheet.SheetChart> Charts { get; }
| Type | Description |
|---|---|
| IReadOnlyList<Documents.Spreadsheet.SheetChart> | Gets the list of charts associated with the sheet. |
Gets the number of columns in the sheet.
public int ColumnCount { get; }
| Type | Description |
|---|---|
| int | Gets the number of columns in the sheet. |
Gets the column axis for the sheet, which defines the properties of the columns.
public Documents.Spreadsheet.Axis Columns { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Axis | Gets the column axis for the sheet, which defines the properties of the columns. |
Gets the conditional formatting store for the sheet.
public Documents.Spreadsheet.ConditionalFormatStore ConditionalFormats { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.ConditionalFormatStore | Gets the conditional formatting store for the sheet. |
Gets the list of filters applied to the sheet.
public IReadOnlyList<Documents.Spreadsheet.SheetFilter> Filters { get; }
| Type | Description |
|---|---|
| IReadOnlyList<Documents.Spreadsheet.SheetFilter> | Gets the list of filters applied to the sheet. |
Gets the registry of formula functions available in the sheet.
public Documents.Spreadsheet.FunctionStore FunctionRegistry { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.FunctionStore | Gets the registry of formula functions available in the sheet. |
Gets the list of images associated with the sheet.
public IReadOnlyList<Documents.Spreadsheet.SheetImage> Images { get; }
| Type | Description |
|---|---|
| IReadOnlyList<Documents.Spreadsheet.SheetImage> | Gets the list of images associated with the sheet. |
Gets the store for merged cells in the sheet, which manages cell merging and unmerging.
public Documents.Spreadsheet.MergedCellStore MergedCells { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.MergedCellStore | Gets the store for merged cells in the sheet, which manages cell merging and unmerging. |
Gets the name of the sheet.
public string Name { get; set; }
| Type | Description |
|---|---|
| string | Gets the name of the sheet. |
Gets or sets the sheet protection settings.
public Documents.Spreadsheet.SheetProtection Protection { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.SheetProtection | Gets or sets the sheet protection settings. |
Gets the number of rows in the sheet.
public int RowCount { get; }
| Type | Description |
|---|---|
| int | Gets the number of rows in the sheet. |
Gets the row axis for the sheet, which defines the properties of the rows.
public Documents.Spreadsheet.Axis Rows { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Axis | Gets the row axis for the sheet, which defines the properties of the rows. |
Gets or sets the currently selected chart.
public Documents.Spreadsheet.SheetChart SelectedChart { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.SheetChart | Gets or sets the currently selected chart. |
Gets or sets the currently selected image.
public Documents.Spreadsheet.SheetImage SelectedImage { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.SheetImage | Gets or sets the currently selected image. |
Gets the selection object that manages the selected cells in the sheet.
public Documents.Spreadsheet.Selection Selection { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Selection | Gets the selection object that manages the selected cells in the sheet. |
Gets the list of tables associated with the sheet.
public IReadOnlyList<Documents.Spreadsheet.Table> Tables { get; }
| Type | Description |
|---|---|
| IReadOnlyList<Documents.Spreadsheet.Table> | Gets the list of tables associated with the sheet. |
Gets the validation store for the sheet, which manages data validation rules and errors.
public Documents.Spreadsheet.ValidationStore Validation { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.ValidationStore | Gets the validation store for the sheet, which manages data validation rules and errors. |
Gets the workbook that contains this sheet.
public Documents.Spreadsheet.Workbook Workbook { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Workbook | Gets the workbook that contains this sheet. |
Adds a chart to the sheet.
public void AddChart(Documents.Spreadsheet.SheetChart chart)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.SheetChart | chart |
Adds a filter to the sheet.
public void AddFilter(Documents.Spreadsheet.SheetFilter filter)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.SheetFilter | filter |
Adds a table to the sheet.
public Documents.Spreadsheet.Table AddTable(string name, Documents.Spreadsheet.RangeRef range, bool hasHeaders, bool totalsRowShown)
| Type | Name | Description |
|---|---|---|
| string | name | Unique table name (used in structured references like =SUM(Sales[Amount])). |
| Documents.Spreadsheet.RangeRef | range | The cell range covered by the table. |
| bool | hasHeaders | When true, the first row of range is treated as the header row. |
| bool | totalsRowShown | When true, the last row of range is treated as the totals row. Used by the XLSX reader; new tables typically toggle this via ShowTotals. |
| Type | Description |
|---|---|
| Documents.Spreadsheet.Table | The created Table. |
Runs action inside a single update batch: formula evaluation is suspended for the duration and runs once afterwards, even if action throws. Nests safely with other batches and direct Begin/EndUpdate calls.
public void Batch(Action action)
| Type | Name | Description |
|---|---|---|
| Action | action |
Runs action inside a single update batch: formula evaluation is suspended for the duration and runs once afterwards, even if action throws. Nests safely with other batches and direct Begin/EndUpdate calls.
public Documents.Spreadsheet.T Batch(Func<Documents.Spreadsheet.T> func)
| Type | Name | Description |
|---|---|---|
| Func<Documents.Spreadsheet.T> | func |
| Type | Description |
|---|---|
| Documents.Spreadsheet.T |
Begins an update operation on the sheet, suspending formula evaluation until the matching EndUpdate. Calls nest: evaluation resumes only when the outermost EndUpdate runs.
public void BeginUpdate()Deletes the specified column and shifts cells left. Updates formulas and decreases column count.
public void DeleteColumn(int columnIndex)
| Type | Name | Description |
|---|---|---|
| int | columnIndex |
Deletes the specified row and shifts cells up. Updates formulas and decreases row count.
public void DeleteRow(int rowIndex)
| Type | Name | Description |
|---|---|---|
| int | rowIndex |
Ends an update operation. When this balances the outermost BeginUpdate, all formulas are re-evaluated once and pending changes are flushed. An unmatched call (no open update) is a no-op.
public void EndUpdate()Retrieves a filter for the specified range.
public Documents.Spreadsheet.SheetFilter GetFilter(Documents.Spreadsheet.RangeRef range)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | range |
| Type | Description |
|---|---|
| Documents.Spreadsheet.SheetFilter |
Gets the table containing the cell at the given row/column, or null if none.
public Documents.Spreadsheet.Table GetTableContaining(int row, int column)
| Type | Name | Description |
|---|---|---|
| int | row | |
| int | column |
| Type | Description |
|---|---|
| Documents.Spreadsheet.Table |
Inserts one or more columns at the specified index and shifts existing cells right. Updates formulas and increases column count.
public void InsertColumn(int columnIndex, int count)
| Type | Name | Description |
|---|---|---|
| int | columnIndex | |
| int | count |
Inserts one or more rows at the specified index and shifts existing cells down. Updates formulas and increases row count.
public void InsertRow(int rowIndex, int count)
| Type | Name | Description |
|---|---|---|
| int | rowIndex | |
| int | count |
Returns true if the cell at the given address is editable (either protection is off or the cell is unlocked).
public bool IsCellEditable(Documents.Spreadsheet.CellRef address)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | address |
| Type | Description |
|---|---|
| bool |
Removes a chart from the sheet.
public bool RemoveChart(Documents.Spreadsheet.SheetChart chart)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.SheetChart | chart |
| Type | Description |
|---|---|
| bool |
Removes a specific filter from the sheet.
public bool RemoveFilter(Documents.Spreadsheet.SheetFilter filter)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.SheetFilter | filter | The filter to remove. |
| Type | Description |
|---|---|
| bool | True if the filter was found and removed; otherwise, false. |
Removes a filter from the sheet at the specified index.
public void RemoveFilterAt(int index)
| Type | Name | Description |
|---|---|---|
| int | index | The index of the filter to remove. |
Removes a table abstraction. Cell content is left in place.
public bool RemoveTable(Documents.Spreadsheet.Table table)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Table | table |
| Type | Description |
|---|---|
| bool |
Sorts the specified range using the given sort levels. Column indices in keys are relative to the range's left edge. Stable: rows with equal keys keep their input order.
public void Sort(Documents.Spreadsheet.RangeRef range, Documents.Spreadsheet.SortKey[] keys)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | range | |
| Documents.Spreadsheet.SortKey[] | keys |
Sorts the specified range using the given sort levels. Column indices in keys are relative to the range's left edge. Stable: rows with equal keys keep their input order.
public void Sort(Documents.Spreadsheet.RangeRef range, SortOrder order, int keyIndex)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | range | |
| SortOrder | order | |
| int | keyIndex |
Raised when sheet chrome (table styling, custom cell types, validation, auto filter) changes and dependent cell views must refresh.
public event Action ChromeChanged