|
NanoXLSX.Core 3.2.1
|
Class representing a formula in a cell, its data, respectively. More...
Public Types | |
| enum | FormulaType { Normal , Array , Shared , DataTable } |
| Enum to define the specific type of a formal if the Cell has the type Cell.CellType.Formula. More... | |
Public Member Functions | |
| FormulaData () | |
| Default constructor. | |
| FormulaData (string expression, object cachedValue=null) | |
| Constructor with formula expression and optional cached value to create a formula of the common type FormulaType.Normal. | |
| int | CompareTo (FormulaData other) |
| Compares this instance with another FormulaData instance. | |
| bool | Equals (FormulaData other) |
| Determines whether the specified FormulaData instance is equal to this instance. | |
| override bool | Equals (object obj) |
| Determines whether the specified object is equal to this instance. | |
| override int | GetHashCode () |
| Returns a hash code consistent with Equals(FormulaData). | |
Properties | |
| string | Expression [get, set] |
| Gets the formula expression as string. This value is currently identical with Cell.Value if Cell.DataType is set to Cell.CellType.Formula. | |
| bool | HasExternalReferences [get, set] |
| Gets whether the formula expression contains a reference to an external workbook. | |
| FormulaType | Type [get, set] |
| Type of the formula. Default is FormulaType.Normal. | |
| string | FormulaRange [get, set] |
| Gets the range associated with an array, shared, or data-table formula. Can be a range or address (string representation). Default is null, if no reference was defined. | |
| DefinedName | DefinedNameReference [get, set] |
| Resolved defined name, if the complete formula expression is a direct reference to exactly one defined name. | |
| object | CachedValue [get, set] |
| Gets the cached value of the formula. | |
| Cell.CellType | CachedValueType [get, set] |
| Gets the data type of CachedValue. The default is Cell.CellType.Default if no cached value or no supported cached value type is available. | |
| string | MasterCellAddress [get, set] |
| Gets the address of the formula's master cell. This is mainly used in case of FormulaType.Array. | |
Class representing a formula in a cell, its data, respectively.
Definition at line 19 of file FormulaData.cs.
Enum to define the specific type of a formal if the Cell has the type Cell.CellType.Formula.
| Enumerator | |
|---|---|
| Normal | Cell contains a regular formula (e.g "A1+A2"). |
| Array | Cell contains a formula that is part of an array. |
| Shared | Cell contains a shared formula, pointing to another formula that is identical. |
| DataTable | Cell contains a formula that is applied across a range of one or more cells. |
Definition at line 27 of file FormulaData.cs.
| NanoXLSX.FormulaData.FormulaData | ( | ) |
Default constructor.
Definition at line 133 of file FormulaData.cs.
| NanoXLSX.FormulaData.FormulaData | ( | string | expression, |
| object | cachedValue = null ) |
Constructor with formula expression and optional cached value to create a formula of the common type FormulaType.Normal.
| expression | Formula expression (without leading equal sign) |
| cachedValue | Optional cached value. Default is null |
Definition at line 145 of file FormulaData.cs.
| int NanoXLSX.FormulaData.CompareTo | ( | FormulaData | other | ) |
Compares this instance with another FormulaData instance.
| other | Other formula data instance, or null. |
Definition at line 215 of file FormulaData.cs.
| bool NanoXLSX.FormulaData.Equals | ( | FormulaData | other | ) |
Determines whether the specified FormulaData instance is equal to this instance.
| other | Other formula data instance, or null. |
Definition at line 259 of file FormulaData.cs.
| override bool NanoXLSX.FormulaData.Equals | ( | object | obj | ) |
Determines whether the specified object is equal to this instance.
| obj | Other object, or null. |
Definition at line 283 of file FormulaData.cs.
| override int NanoXLSX.FormulaData.GetHashCode | ( | ) |
Returns a hash code consistent with Equals(FormulaData).
Definition at line 292 of file FormulaData.cs.
|
getset |
Gets the cached value of the formula.
Definition at line 108 of file FormulaData.cs.
|
getset |
Gets the data type of CachedValue. The default is Cell.CellType.Default if no cached value or no supported cached value type is available.
Definition at line 114 of file FormulaData.cs.
|
getset |
Resolved defined name, if the complete formula expression is a direct reference to exactly one defined name.
Definition at line 93 of file FormulaData.cs.
|
getset |
Gets the formula expression as string. This value is currently identical with Cell.Value if Cell.DataType is set to Cell.CellType.Formula.
Definition at line 56 of file FormulaData.cs.
|
getset |
Gets the range associated with an array, shared, or data-table formula. Can be a range or address (string representation). Default is null, if no reference was defined.
Definition at line 87 of file FormulaData.cs.
|
getset |
Gets whether the formula expression contains a reference to an external workbook.
Definition at line 69 of file FormulaData.cs.
|
getset |
Gets the address of the formula's master cell. This is mainly used in case of FormulaType.Array.
Definition at line 119 of file FormulaData.cs.
|
getset |
Type of the formula. Default is FormulaType.Normal.
Definition at line 82 of file FormulaData.cs.