CellData Class

Represents a value of a spreadsheet cell along with its type.

Inheritance

Object

Documents.Spreadsheet.CellData

Namespace: Radzen.Documents.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class CellData

Constructors

CellDatalink

Creates a new instance of CellData with the specified data.

Declaration
public CellData(object data)
Parameters
Type Name Description
object data

Properties

IsEmptylink

Returns true if the cell is empty (null or empty string).

Declaration
public bool IsEmpty { get; }
Property Value
Type Description
boolReturns true if the cell is empty (null or empty string).

IsErrorlink

Returns true if the cell contains an error value.

Declaration
public bool IsError { get; }
Property Value
Type Description
boolReturns true if the cell contains an error value.

Typelink

Returns the type of value contained in the cell.

Declaration
public Documents.Spreadsheet.CellDataType Type { get; }
Property Value
Type Description
Documents.Spreadsheet.CellDataTypeReturns the type of value contained in the cell.

Valuelink

Returns the data contained in the cell.

Declaration
public object Value { get; }
Property Value
Type Description
objectReturns the data contained in the cell.

Methods

CompareTolink

Declaration
public int CompareTo(Documents.Spreadsheet.CellData other)
Parameters
Type Name Description
Documents.Spreadsheet.CellData other
Returns
Type Description
int

CompareTolink

Declaration
public int CompareTo(object obj)
Parameters
Type Name Description
object obj
Returns
Type Description
int

FromBooleanlink

Creates a CellData instance for a boolean value.

Declaration
public static Documents.Spreadsheet.CellData FromBoolean(bool value)
Parameters
Type Name Description
bool value
Returns

FromDatelink

Creates a CellData instance for a date value.

Declaration
public static Documents.Spreadsheet.CellData FromDate(DateTime value)
Parameters
Type Name Description
DateTime value
Returns

FromErrorlink

Creates a CellData instance for an error value.

Declaration
public static Documents.Spreadsheet.CellData FromError(Documents.Spreadsheet.CellError error)
Parameters
Type Name Description
Documents.Spreadsheet.CellError error
Returns

FromNumberlink

Creates a CellData instance for a numeric value.

Declaration
public static Documents.Spreadsheet.CellData FromNumber(double value)
Parameters
Type Name Description
double value
Returns

FromStringlink

Creates a CellData instance for a string value.

Declaration
public static Documents.Spreadsheet.CellData FromString(string value)
Parameters
Type Name Description
string value
Returns

GetHashCodelink

Declaration
public override int GetHashCode()
Returns
Type Description
int

GetValueOrDefaultlink

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.

Declaration
public Documents.Spreadsheet.T GetValueOrDefault()
Returns
Type Description
Documents.Spreadsheet.T

ToStringlink

Declaration
public override string ToString()
Returns
Type Description
string
An error has occurred. This app may no longer respond until reloaded. Reload 🗙