Interface IEvaluationContext
Supplies spreadsheet data required by formula evaluation. 提供公式評估所需的試算表資料存取介面。
public interface IEvaluationContext
Properties
CurrentCell
Gets the absolute address of the cell currently being evaluated. 取得目前正在評估的儲存格絕對位址。
OdfCellAddress CurrentCell { get; }
Property Value
Remarks
This value is used for circular dependency tracking. 此值用於循環相依性追蹤。
Methods
GetCellFormula(OdfCellAddress)
Gets the formula string for a cell, or null or an empty string for static-value cells. 取得儲存格的公式字串,若為靜態值儲存格則傳回 null 或空字串。
string? GetCellFormula(OdfCellAddress address)
Parameters
addressOdfCellAddressThe cell address. / 儲存格位址。
Returns
- string
The formula string, or null. / 公式字串,或為 null。
GetCellValue(OdfCellAddress)
Gets the raw or evaluated value of a single cell. 取得單一儲存格的原始值或已評估的值。
object GetCellValue(OdfCellAddress address)
Parameters
addressOdfCellAddressThe cell address. / 儲存格位址。
Returns
- object
The cell value. / 儲存格的值。
Remarks
If the cell contains an unevaluated formula, this call triggers evaluation. 如果該儲存格包含未計算的公式,這將觸發其評估。
GetNamedRangeOrExpressionValue(string)
Resolves and returns the value of a named range or named expression. 解析並傳回具名範圍或具名運算式的值。
object GetNamedRangeOrExpressionValue(string name)
Parameters
namestringThe named range or named expression name. / 具名範圍或具名運算式的名稱。
Returns
- object
The value of the named range or expression. / 具名範圍或運算式的值。
GetRangeValues(OdfCellRange)
Gets values for a cell range as a two-dimensional array. 以二維陣列形式取得儲存格範圍的值。
object[,] GetRangeValues(OdfCellRange range)
Parameters
rangeOdfCellRangeThe cell range. / 儲存格範圍。
Returns
- object[,]
A two-dimensional array containing the values in the range. / 包含範圍內儲存格值的二維陣列。