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 to this section

Creates a new instance of CellData with the specified data. String values are type-inferred using the invariant culture.

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

Properties

IsEmptyLink to this section

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 to this section

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 to this section

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 to this section

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 to this section

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

CompareToLink to this section

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

FromBooleanLink to this section

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 to this section

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 to this section

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 to this section

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 to this section

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 to this section

Declaration
public override int GetHashCode()
Returns
Type Description
int

GetValueOrDefaultLink to this section

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 to this section

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