Class CellValueFactory
Produces instances of ICellValue type.
Inheritance
Inherited Members
Namespace: Telerik.Windows.Documents.Spreadsheet.Model
Assembly: Telerik.Windows.Documents.Spreadsheet.dll
Syntax
public static class CellValueFactory
Methods
Create(Boolean)
Creates an ICellValue instance from a bool value.
Declaration
public static ICellValue Create(bool value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
Create(DateTime)
Creates an ICellValue instance from a DateTime value.
Declaration
public static ICellValue Create(DateTime value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
Create(Double)
Creates an ICellValue instance from a double value.
Declaration
public static ICellValue Create(double value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
Create(String, Worksheet, Int32, Int32, CellValueFormat, out ICellValue, out CellValueFormat)
Creates an ICellValue instance.
Declaration
public static void Create(string value, Worksheet worksheet, int rowIndex, int columnIndex, CellValueFormat currentFormatValue, out ICellValue cellValue, out CellValueFormat newFormatValue)
Parameters
System. The value. |
Worksheet
worksheet
The worksheet. |
System. Index of the row. |
System. Index of the column. |
Cell The current format value. |
ICell The cell value. |
Cell The format value. |
Create(String, Worksheet, CellIndex, CellValueFormat, out ICellValue, out CellValueFormat)
Creates the specified value.
Declaration
public static void Create(string value, Worksheet worksheet, CellIndex cellIndex, CellValueFormat currentFormatValue, out ICellValue cellValue, out CellValueFormat newFormatValue)
Parameters
System. The value. |
Worksheet
worksheet
The worksheet. |
Cell Index of the cell. |
Cell The current format value. |
ICell The cell value. |
Cell The new format value. |
CreateFormulaCellValue(String, Worksheet, Int32, Int32)
Creates a formula cell value.
Declaration
public static ICellValue CreateFormulaCellValue(string value, Worksheet worksheet, int rowIndex, int columnIndex)
Parameters
System. The value. |
Worksheet
worksheet
The worksheet. |
System. Index of the row. |
System. Index of the column. |
Returns
ICell The ICellValue instance. |
CreateTextCellValue(String)
Creates a text cell value.
Declaration
public static ICellValue CreateTextCellValue(string value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
GetCellValueType(ConstantExpression)
Gets the type of the cell value resulting from an expression.
Declaration
public static CellValueType GetCellValueType(this ConstantExpression value)
Parameters
Constant The expression. |
Returns
Cell The cell value type. |
ToCellValue(Boolean)
Produces an ICellValue instance.
Declaration
public static ICellValue ToCellValue(this bool value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
ToCellValue(DateTime)
Produces an ICellValue instance.
Declaration
public static ICellValue ToCellValue(this DateTime value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
Remarks
Please note the date is stored as number value. If a date number format is not set to the cell the value will be shown as number.
ToCellValue(Double)
Produces an ICellValue instance.
Declaration
public static ICellValue ToCellValue(this double value)
Parameters
System. The value. |
Returns
ICell The ICellValue instance. |
ToCellValue(String, Worksheet, Int32, Int32)
Produces an ICellValue instance.
Declaration
public static ICellValue ToCellValue(this string value, Worksheet worksheet, int rowIndex, int columnIndex)
Parameters
System. The value. |
Worksheet
worksheet
The worksheet. |
System. Index of the row. |
System. Index of the column. |
Returns
ICell The ICellValue instance. |
Remarks
Please note that the string value is parsed to find its type. This process is slow. If you know the type of your data use the other overloads of this method.
ToCellValue(String, Worksheet, CellIndex)
Produces an ICellValue instance.
Declaration
public static ICellValue ToCellValue(this string value, Worksheet worksheet, CellIndex cellIndex)
Parameters
System. The value. |
Worksheet
worksheet
The worksheet. |
Cell Index of the cell. |
Returns
ICell The ICellValue instance. |
Remarks
Please note that the string value is parsed to find its type. This process is slow. If you know the type of your data use the other overloads of this method.
ToCellValue(CellIndex, Worksheet)
Produces an ICellValue instance.
Declaration
public static ICellValue ToCellValue(this CellIndex value, Worksheet worksheet)
Parameters
Returns
ICell The ICellValue instance. |
ToFormulaCellValue(String, Worksheet, Int32, Int32)
Produces an FormulaCellValue instance.
Declaration
public static ICellValue ToFormulaCellValue(this string value, Worksheet worksheet, int rowIndex, int columnIndex)
Parameters
System. The value. |
Worksheet
worksheet
The worksheet. |
System. Index of the row. |
System. Index of the column. |
Returns
ICell The FormulaCellValue instance. |
ToTextCellValue(String)
Produces an TextCellValue instance.
Declaration
public static ICellValue ToTextCellValue(this string value)
Parameters
System. The value. |
Returns
ICell The TextCellValue instance. |