TSingleFormulaValue Record
Represents a single value inside a formula.
Syntax
Unit: FlexCel.Core
TSingleFormulaValue = record;
Methods
Name | Description |
---|---|
Empty | Creates a formula value without value. |
Create | Overloaded Create(Double) Create(Int64) Create(TDateTime) Create(string) Create(Boolean) Create(TFlxFormulaErrorValue) Create(TAddress) Create(TXls3DRange) Create(TAverageValue) Create(TArray<TAddress>, Boolean) Create(TAddress, TAddress, Boolean) |
MissingArg | Creates a formula value containing a missing argument. |
FromLambda | Creates a formula value containing a Lambda. Note that Lambdas are used internally only. You shouldn't use this overload, and a public TFormulaValue should never contain a lambda. |
ClearValue | Makes the instance empty. |
IsEmpty | Returns true if the formula is empty. |
HasValue | Returns true if the formula has a value. This method is the same as not IsEmpty |
IsNumber | Returns true if the formula has a number. |
IsDateTime | Returns true if the formula has a datetime. Note that formulas by default never have datetimes, they have numbers instead. |
IsString | Returns true if the formula contains a string. |
IsBoolean | Returns true if the formula contains a boolean. |
IsError | Returns true if the formula contains an error. |
IsMissingArg | Returns true if the value is a missing argument from a function, like in the formula =MyFunction(1, ,3) where the second parameter is missing. |
IsCellAddress | Returns true if the formula has a TCellAddress |
IsCellRange | Returns true if the formula contains a range of cells. |
IsRange3D | Returns true if the formula contains a range of cells spanning more than one sheet. |
IsAverage | Returns true if the formula contains an Average value. This value is used internally to calculate averages, formula results won't contain averages. |
IsLambda | Returns true if the formula contains lambda function. This is used internally to calculate, formula results won't contain lambdas. |
AsNumber | Returns the value of the formula if it contains a number. If it contains other datatype, this method will throw an exception. Check IsNumber to see if the formula contains a number. |
AsDateTime | Returns the value of the formula if it contains a detetime. If it contains other datatype, this method will throw an exception. Check IsDateTime to see if the formula contains a datetime. |
AsString | Returns the value of the formula if it contains a string. If it contains other datatype, this method will throw an exception. Check IsString to see if the formula contains a string. |
AsBoolean | Returns the value of the formula if it contains a boolean. If it contains other datatype, this method will throw an exception. Check IsBoolean to see if the formula contains a boolean. |
AsError | Returns the value of the formula if it contains an error. If it contains other datatype, this method will throw an exception. Check IsError to see if the formula contains an error. |
AsCellAddress | Returns the value of the formula if it contains a cell adress. If it contains other datatype, this method will throw an exception. Check IsCellAddress to see if the formula contains a cell address. |
AsCellRange | Returns the value of the formula if it contains a range of cells. If it contains other datatype, this method will throw an exception. Check IsCellRange to see if the formula contains a range of cells. |
AsRange3D | Returns the value of the formula if it contains a range of cells covering many sheets. If it contains other datatype, this method will throw an exception. Check IsRange3D to see if the formula contains a range of cells in multiple sheets. |
AsCellAddressString | Returns the value of the formula if it contains a range of cells. If it contains other datatype, this method will throw an exception. Different from AsCellAddress, this method will return a string like "A1" instead of an array of TAddress object. Check IsCellAddress to see if the formula contains a range of cells. |
AsCellRangeString | Returns the value of the formula if it contains a range of cells. If it contains other datatype, this method will throw an exception. Different from AsCellRange, this method will return a string like "A1:A10" instead of an array of TAddress object. Check IsCellRange to see if the formula contains a range of cells. |
AsRange3DString | Returns the value of the formula if it contains a range of cells. If it contains other datatype, this method will throw an exception. Different from AsRange3D, this method will return a string like "Sheet1:Sheet2!A1:A10" instead of a TXls3DRange object. Check IsCellRange to see if the formula contains a range of cells. |
AsAverage | Returns the value of the formula if it contains an average. If it contains other datatype, this method will throw an exception. Check IsAverage to see if the formula contains an average. |
AsLambda | Returns the value of the formula if it contains a lambda function. If it contains other datatype, this method will throw an exception. Check IsLambda to see if the formula contains a lambda function. |
AsVariant | Returns the formula result as a variant. |
AsTValue | Returns the formula result as a TValue. |
ToString | Converts the formula result to a string. |
ToStringInvariant | Converts the formula result to a string with invariant format. This means that for example the number 1.2 will be converted to the string '1.2' even if in the active locale it would '1,2' because the decimal separator is a comma. To get the number as a string in the current locale, use ToString |