Represents a value of a spreadsheet cell along with its type.
Object
Namespace: Radzen.Documents.Spreadsheet
Assembly: Radzen.Blazor.dll
public class CellDataCreates a new instance of CellData with the specified data. String values are type-inferred using the invariant culture.
public CellData(object data)
| Type | Name | Description |
|---|---|---|
| object | data |
Returns true if the cell is empty (null or empty string).
public bool IsEmpty { get; }
| Type | Description |
|---|---|
| bool | Returns true if the cell is empty (null or empty string). |
Returns true if the cell contains an error value.
public bool IsError { get; }
| Type | Description |
|---|---|
| bool | Returns true if the cell contains an error value. |
Returns the type of value contained in the cell.
public Documents.Spreadsheet.CellDataType Type { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellDataType | Returns the type of value contained in the cell. |
Returns the data contained in the cell.
public object Value { get; }
| Type | Description |
|---|---|
| object | Returns the data contained in the cell. |
public int CompareTo(Documents.Spreadsheet.CellData other)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellData | other |
| Type | Description |
|---|---|
| int |
public int CompareTo(object obj)
| Type | Name | Description |
|---|---|---|
| object | obj |
| Type | Description |
|---|---|
| int |
Creates a CellData instance for a boolean value.
public static Documents.Spreadsheet.CellData FromBoolean(bool value)
| Type | Name | Description |
|---|---|---|
| bool | value |
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellData |
Creates a CellData instance for a date value.
public static Documents.Spreadsheet.CellData FromDate(DateTime value)
| Type | Name | Description |
|---|---|---|
| DateTime | value |
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellData |
Creates a CellData instance for an error value.
public static Documents.Spreadsheet.CellData FromError(Documents.Spreadsheet.CellError error)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellError | error |
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellData |
Creates a CellData instance for a numeric value.
public static Documents.Spreadsheet.CellData FromNumber(double value)
| Type | Name | Description |
|---|---|---|
| double | value |
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellData |
Creates a CellData instance for a string value.
public static Documents.Spreadsheet.CellData FromString(string value)
| Type | Name | Description |
|---|---|---|
| string | value |
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellData |
public override int GetHashCode()
| Type | Description |
|---|---|
| int |
Returns the Cell's Value and attempts to cast it to T. If the Value is null or cannot be converted, returns the default value of T.
public Documents.Spreadsheet.T GetValueOrDefault()
| Type | Description |
|---|---|
| Documents.Spreadsheet.T |
public override string ToString()
| Type | Description |
|---|---|
| string |