XLL+ Class Library (7.0)


Invoke the Excel SDK

static int cdecl Excel(
   int xlfn,
   int count,
   const CXlOper* arg0,
static int cdecl Excel(
   int xlfn
static int cdecl Excel(
   int xlfn,
   int count0



The Excel built-in function number. See Excel built-in function numbers for a list of values.


The number of XLOPER pointer arguments being passed to Excel.


The first argument to the function.


The remaining count-1 arguments (if any) to the function should also be const pointers to CXlOper.


The number of XLOPER pointer arguments being passed to Excel. For this variant of Excel(), this value should always be 0.

Return Value

The result of the SDK call-back. xlretSuccess (0) indicates success. Other values indicate failure. A full list of return values can be found under Error Values.


This function can be used to call an Excel built-in function via the Microsoft Excel SDK. Details of SDK calls and their arguments can be found in the Microsoft Excel 4 Function Reference.

This function should not be used if you have any interest in the value returned by the callback function. To receive a return value, use CXlOper::Excel(), which places the result in the calling CXlOper object.

Since this function is static, it is not necessary to use an instance of CXllApp to invoke it. You can use code such as:

    CXlOper xloBarNum;
    CXllApp::Excel(xlfDeleteToolbar, 1, xloBarNum);

CXlFuncs & CXlMacros

Most Excel worksheet and macro functions can be found, as ready-wrapped C++ methods, in the CXlFuncs and CXlMacros classes respectively.


Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods | CXlOper::Excel | Error Values | CXlFuncs class | CXlMacros class | Excel built-in function numbers | Calling an Excel built-in function from your add-in