XLL+ Class Library (7.0)


Set the formula of the referenced cell, in English

BOOL SetFormulaIntl(
   const TCHAR* pszFormula,
   BOOL bArray = FALSE,
   BOOL bA1 = TRUE
) const;



String buffer containing the formula. The formula is assumed to be in English, using US English regional settings - i.e. arguments and lists are separated by commas; rows in arrays are separated by semi-colons; the full stop is used as a decimal point.

If the formula is not in the correct English format, then the call will fail. To use a formula which works using local language settings, see CXlOper::SetFormula.


TRUE if the target should be filled with an array formula; FALSE if each cell should be filled with a standard formula.


If TRUE, then the formula should contain references in A1 format; if FALSE, the references should be in RC format.

Return Value

Returns TRUE if the function was successful, FALSE if it failed. The function can fail if the CXlOper does not contain a reference, if the formula is invalid, or if the function cannot be run in Excel at this time.


This function can only be called from macro functions. It will always fail if called from worksheet functions.

International considerations

This method will work in all Excel language versions and under any user-selected regional settings. Note that all formulae must be in English.

Alternatively, you can use CXlOper::SetFormula to apply formulae in the local language.


Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::GetFormulaIntl() | CXlOper::ConvertFormulaIntl() | CXlOper::SetLongFormulaIntl() | CXlOper::SetFormula()