Represents a cell in a spreadsheet.
Object
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public class CellGets the address of the cell.
public Documents.Spreadsheet.CellRef Address { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellRef | Gets the address of the cell. |
Gets the current value and its type as a CellData object.
public Documents.Spreadsheet.CellData Data { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellData | Gets the current value and its type as a CellData object. |
Gets or sets the format of the cell.
public Documents.Spreadsheet.Format Format { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Format | Gets or sets the format of the cell. |
Gets or sets the formula of the cell.
public string Formula { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the formula of the cell. |
Gets a value indicating whether the cell has validation errors.
public bool HasValidationErrors { get; }
| Type | Description |
|---|---|
| bool | Gets a value indicating whether the cell has validation errors. |
Gets or sets the hyperlink associated with this cell.
public Documents.Spreadsheet.Hyperlink Hyperlink { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Hyperlink | Gets or sets the hyperlink associated with this cell. |
Gets a value indicating whether this cell has no meaningful content (no value, formula, format, or hyperlink).
public bool IsEmpty { get; }
| Type | Description |
|---|---|
| bool | Gets a value indicating whether this cell has no meaningful content (no value, formula, format, or hyperlink). |
Gets or sets a value indicating whether the cell value was entered with a leading apostrophe and should be treated as literal text even if it looks like a formula. Mirrors Excel's quotePrefix cell flag.
public bool QuotePrefix { get; set; }
| Type | Description |
|---|---|
| bool | Gets or sets a value indicating whether the cell value was entered with a leading apostrophe and should be treated as literal text even if it looks like a formula. Mirrors Excel's quotePrefix cell flag. |
Gets the validation errors for the cell.
public IReadOnlyList<string> ValidationErrors { get; }
| Type | Description |
|---|---|
| IReadOnlyList<string> | Gets the validation errors for the cell. |
Gets or sets the value of the cell.
public object Value { get; set; }
| Type | Description |
|---|---|
| object | Gets or sets the value of the cell. |
Gets the type of value contained in the cell.
public Documents.Spreadsheet.CellDataType ValueType { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellDataType | Gets the type of value contained in the cell. |
Gets the sheet that contains this cell.
public Documents.Spreadsheet.Worksheet Worksheet { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Worksheet | Gets the sheet that contains this cell. |
Clones the cell, creating a new instance with the same properties.
public Documents.Spreadsheet.Cell Clone()
| Type | Description |
|---|---|
| Documents.Spreadsheet.Cell |
Copies the properties from another cell to this cell.
public void CopyFrom(Documents.Spreadsheet.Cell other)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Cell | other |
Gets the value of the cell as a string, or the formula if it exists.
public string GetValue()
| Type | Description |
|---|---|
| string |
Gets the value of the cell as a string.
public string GetValueAsString()
| Type | Description |
|---|---|
| string |
Sets the value of the cell based on a string input. A leading apostrophe escapes the value — the apostrophe is stripped, the remainder is stored as text, and QuotePrefix is set. Otherwise, a string starting with '=' is treated as a formula.
public void SetValue(string value)
| Type | Name | Description |
|---|---|---|
| string | value |
Validates the cell's value against the sheet's validation rules.
public void Validate()