Aspose::Cells::Worksheet::CalculateFormula method

Worksheet::CalculateFormula(const U16String&) method

Calculates a formula.

Aspose::Cells::Object Aspose::Cells::Worksheet::CalculateFormula(const U16String &formula)
ParameterTypeDescription
formulaconst U16String&Formula to be calculated.

ReturnValue

Calculated formula result.

See Also

Worksheet::CalculateFormula(const char16_t*) method

Calculates a formula.

Aspose::Cells::Object Aspose::Cells::Worksheet::CalculateFormula(const char16_t *formula)
ParameterTypeDescription
formulaconst char16_t*Formula to be calculated.

ReturnValue

Calculated formula result.

See Also

Worksheet::CalculateFormula(const U16String&, const CalculationOptions&) method

Calculates a formula expression directly.

Aspose::Cells::Object Aspose::Cells::Worksheet::CalculateFormula(const U16String &formula, const CalculationOptions &opts)
ParameterTypeDescription
formulaconst U16String&Formula to be calculated.
optsconst CalculationOptions&Options for calculating formula

ReturnValue

Calculated result of given formula. The returned object may be of possible types of Cell.Value, or ReferredArea.

Remarks

The formula will be calculated just like it has been set to cell A1. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please use CalculateArrayFormula(string, CalculationOptions) instead.

See Also

Worksheet::CalculateFormula(const char16_t*, const CalculationOptions&) method

Calculates a formula expression directly.

Aspose::Cells::Object Aspose::Cells::Worksheet::CalculateFormula(const char16_t *formula, const CalculationOptions &opts)
ParameterTypeDescription
formulaconst char16_t*Formula to be calculated.
optsconst CalculationOptions&Options for calculating formula

ReturnValue

Calculated result of given formula. The returned object may be of possible types of Cell.Value, or ReferredArea.

Remarks

The formula will be calculated just like it has been set to cell A1. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please use CalculateArrayFormula(string, CalculationOptions) instead.

See Also

Worksheet::CalculateFormula(const U16String&, const FormulaParseOptions&, const CalculationOptions&, int32_t, int32_t, const CalculationData&) method

Calculates a formula expression directly.

Aspose::Cells::Object Aspose::Cells::Worksheet::CalculateFormula(const U16String &formula, const FormulaParseOptions &pOpts, const CalculationOptions &cOpts, int32_t baseCellRow, int32_t baseCellColumn, const CalculationData &calculationData)
ParameterTypeDescription
formulaconst U16String&Formula to be calculated.
pOptsconst FormulaParseOptions&Options for parsing formula.
cOptsconst CalculationOptions&Options for calculating formula.
baseCellRowint32_tThe row index of the base cell.
baseCellColumnint32_tThe column index of the base cell.
calculationDataconst CalculationData&The calculation data. It is used for the situation that user needs to calculate some static formulas when implementing custom calculation engine. For such kind of situation, user needs to specify it with the calculation data provided for AbstractCalculationEngine.Calculate(CalculationData).

ReturnValue

Calculated result of given formula. The returned object may be of possible types of Cell.Value, or ReferredArea.

Remarks

The formula will be calculated just like it has been set to the specified base cell. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please use CalculateArrayFormula(string, FormulaParseOptions, CalculationOptions, int, int, int, int, CalculationData) instead.

See Also

Worksheet::CalculateFormula(const char16_t*, const FormulaParseOptions&, const CalculationOptions&, int32_t, int32_t, const CalculationData&) method

Calculates a formula expression directly.

Aspose::Cells::Object Aspose::Cells::Worksheet::CalculateFormula(const char16_t *formula, const FormulaParseOptions &pOpts, const CalculationOptions &cOpts, int32_t baseCellRow, int32_t baseCellColumn, const CalculationData &calculationData)
ParameterTypeDescription
formulaconst char16_t*Formula to be calculated.
pOptsconst FormulaParseOptions&Options for parsing formula.
cOptsconst CalculationOptions&Options for calculating formula.
baseCellRowint32_tThe row index of the base cell.
baseCellColumnint32_tThe column index of the base cell.
calculationDataconst CalculationData&The calculation data. It is used for the situation that user needs to calculate some static formulas when implementing custom calculation engine. For such kind of situation, user needs to specify it with the calculation data provided for AbstractCalculationEngine.Calculate(CalculationData).

ReturnValue

Calculated result of given formula. The returned object may be of possible types of Cell.Value, or ReferredArea.

Remarks

The formula will be calculated just like it has been set to the specified base cell. And the formula will be taken as normal formula. If you need the formula be calculated as an array formula and to get an array for the calculated result, please use CalculateArrayFormula(string, FormulaParseOptions, CalculationOptions, int, int, int, int, CalculationData) instead.

See Also

Worksheet::CalculateFormula(const CalculationOptions&, bool) method

Calculates all formulas in this worksheet.

void Aspose::Cells::Worksheet::CalculateFormula(const CalculationOptions &options, bool recursive)
ParameterTypeDescription
optionsconst CalculationOptions&Options for calculation
recursiveboolTrue means if the worksheet’ cells depend on the cells of other worksheets, the dependent cells in other worksheets will be calculated too. False means all the formulas in the worksheet have been calculated and the values are right.

See Also