Represents a store for spreadsheet cells, allowing access and modification of cell values.
Object
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public class CellStoreRepresents a store for spreadsheet cells, allowing access and modification of cell values.
public CellStore(Documents.Spreadsheet.Worksheet sheet)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Worksheet | sheet |
Stores the cells in a dictionary, where the key is a tuple of (row, column).
protected readonly Dictionary<ValueTuple<int, int>, Documents.Spreadsheet.Cell> dataGets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.
public Documents.Spreadsheet.Cell Item { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Cell | Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store. |
Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.
public Documents.Spreadsheet.Cell Item { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Cell | Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store. |
Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store.
public Documents.Spreadsheet.Cell Item { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Cell | Gets a cell at the specified row and column. If the cell does not exist, it is created and added to the store. |
Gets the sheet that owns this cell store.
public Documents.Spreadsheet.Worksheet Worksheet { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Worksheet | Gets the sheet that owns this cell store. |
Ensures that the specified row and column indices are within the bounds of the sheet.
protected void EnsureWithinBounds(int row, int column)
| Type | Name | Description |
|---|---|---|
| int | row | The row index to check. |
| int | column | The column index to check. |
Gets the custom cell type for the specified cell, or null if no custom type is set.
public string GetCustomType(int row, int column)
| Type | Name | Description |
|---|---|---|
| int | row | The row index of the cell. |
| int | column | The column index of the cell. |
| Type | Description |
|---|---|
| string | The custom type name, or null if no custom type is set. |
Sets a custom cell type for the specified cell.
public void SetCustomType(Documents.Spreadsheet.CellRef cell, string type)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | cell | The cell reference. |
| string | type | The custom type name, or null to remove the custom type. |
Sets a custom cell type for the specified cell.
public void SetCustomType(Documents.Spreadsheet.RangeRef range, string type)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.RangeRef | range | |
| string | type | The custom type name, or null to remove the custom type. |
Attempts to get a cell at the specified row and column. Returns true only if the cell has been populated. Does not create new cells.
public bool TryGet(int row, int column, Documents.Spreadsheet.Cell& cell)
| Type | Name | Description |
|---|---|---|
| int | row | The row index of the cell. |
| int | column | The column index of the cell. |
| Documents.Spreadsheet.Cell& | cell | The cell at the specified row and column if it exists; otherwise, null. |
| Type | Description |
|---|---|
| bool | True if the cell exists in the store; otherwise, false. |