Class CellData
Represents the full state of a spreadsheet cell, including its value, formula, hyperlink, display text, number format, wrapping/locking flags, and visual style.
Inherited Members
Namespace: Syncfusion.Blazor.Spreadsheet
Assembly: Syncfusion.Blazor.Spreadsheet.dll
Syntax
public class CellData
Remarks
This class is a comprehensive container for a cell's state, designed for serialization. It includes everything from the underlying value and formula to visual style and formatting details.
Constructors
CellData()
Declaration
public CellData()
Properties
DisplayText
Gets the text that is displayed to the user in the cell's UI.
Declaration
[JsonPropertyName("displayText")]
public string DisplayText { get; init; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the final rendered value, after applying any number or date formats. |
Format
Gets the number/date format code applied to the cell, if any.
Declaration
[JsonPropertyName("format")]
public string Format { get; init; }
Property Value
| Type | Description |
|---|---|
| string | A string representing the format pattern (e.g., "MM/dd/yyyy", "$#,##0.00"). Returns null if no format is applied. |
Formula
Gets the cell's formula, if one exists.
Declaration
[JsonPropertyName("formula")]
public string Formula { get; init; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the formula (e.g., "=SUM(A1:A10)"). Returns null if the cell does not contain a formula. |
Hyperlink
Gets the URL or address of a hyperlink in the cell, if one is present.
Declaration
[JsonPropertyName("hyperlink")]
public string Hyperlink { get; init; }
Property Value
| Type | Description |
|---|---|
| string | A string containing the hyperlink's destination. Returns null if the cell does not have a hyperlink. |
Style
Gets the complete style information defining the cell's appearance.
Declaration
[JsonPropertyName("style")]
public CellStyle Style { get; init; }
Property Value
| Type | Description |
|---|---|
| CellStyle | A CellStyle object that contains all visual styling attributes for the cell. |
Value
Gets the underlying, raw data of the cell.
Declaration
[JsonPropertyName("value")]
public object Value { get; init; }
Property Value
| Type | Description |
|---|---|
| object | An object containing the cell's raw value. For example, this could be a number, a date, or text. |
Wraptext
Gets a value indicating whether the cell is configured to wrap long text onto multiple lines.
Declaration
[JsonPropertyName("wraptext")]
public bool Wraptext { get; init; }
Property Value
| Type | Description |
|---|---|
| bool | Is true if text wrapping is applied; otherwise, false. The default is false. |
isLocked
Gets a value indicating whether the cell is locked against editing when the worksheet is protected.
Declaration
[JsonPropertyName("isLocked")]
public bool isLocked { get; init; }
Property Value
| Type | Description |
|---|---|
| bool | true if the cell is locked; otherwise, false. The default is true |