CellFormula Class

The CellFormula class provides a API that is used to handle the cell formula. More...

Header: #include <CellFormula>

Public Types

enum FormulaType { NormalType, ArrayType, DataTableType, SharedType }

Public Functions

CellFormula()
CellFormula(const char * formula, FormulaType type = NormalType)
CellFormula(const QString & formula, FormulaType type = NormalType)
CellFormula(const QString & formula, const CellRange & ref, FormulaType type)
CellFormula(const CellFormula & other)
~CellFormula()
QString formulaText() const
FormulaType formulaType() const
bool isValid() const
CellRange reference() const
int sharedIndex() const
CellFormula & operator=(const CellFormula & other)

Detailed Description

The CellFormula class provides a API that is used to handle the cell formula.

Member Type Documentation

enum CellFormula::FormulaType

ConstantValue
CellFormula::NormalType0
CellFormula::ArrayType1
CellFormula::DataTableType2
CellFormula::SharedType3

Member Function Documentation

CellFormula::CellFormula()

Creates a new formula.

CellFormula::CellFormula(const char * formula, FormulaType type = NormalType)

Creates a new formula with the given formula and type.

CellFormula::CellFormula(const QString & formula, FormulaType type = NormalType)

Creates a new formula with the given formula and type.

CellFormula::CellFormula(const QString & formula, const CellRange & ref, FormulaType type)

Creates a new formula with the given formula, ref and type.

CellFormula::CellFormula(const CellFormula & other)

Creates a new formula with the same attributes as the other formula.

CellFormula::~CellFormula()

Destroys this formula.

QString CellFormula::formulaText() const

Returns the contents of the formula.

FormulaType CellFormula::formulaType() const

Returns the type of the formula.

bool CellFormula::isValid() const

Returns whether the formula is valid.

CellRange CellFormula::reference() const

Returns the reference cells of the formula. For normal formula, this will return an invalid CellRange object.

int CellFormula::sharedIndex() const

Returns the shared index for shared formula.

CellFormula & CellFormula::operator=(const CellFormula & other)

Assigns the other formula to this formula, and returns a reference to this formula.