Invoke the Excel SDK
int cdecl Excel(
int xlfn,
int count,
const CXlOper* pxlo,
...
);
int cdecl Excel(
int xlfn,
int count,
const XLOPER4* pxlo4,
...
);
int cdecl Excel(
int xlfn,
int count,
const XLOPER12* pxlo12,
...
);
int cdecl Excel(
int xlfn,
int count,
const CXlOper*[] array_xlo
);
int cdecl Excel(
int xlfn,
int count,
const XLOPER4*[] array_xlo4
);
int cdecl Excel(
int xlfn,
int count,
const XLOPER12*[] array_xlo12
);
|
The Excel built-in function number. See Excel built-in function numbers for a list of values.
The number of arguments being passed to Excel.
A pointer to an initialized CXlOper object.
The remaining count-1 arguments to the function should be of a the same type as the first argument.
A pointer to an initialized XLOPER4 structure.
A pointer to an initialized XLOPER12 structure.
A pointer to an array of count initialized CXlOper pointers.
A pointer to an array of count initialized XLOPER4 pointers.
A pointer to an array of count initialized XLOPER12 pointers.
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 Codes.
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.
The result of the call will be put in the object which made it. The CXlOper will be marked for special memory clean-up, since the data returned is owned by Excel. If you have no interest in the value returned by Excel, use CXllApp::Excel() instead.
Most Excel worksheet and macro functions can be found, as ready-wrapped C++ methods, in the CXlFuncs and CXlMacros classes respectively.
Header: xllplus.h
CXlOper Class | CXlOper Methods | CXllApp::Excel() | Error Values | CXlFuncs class | CXlMacros class | Excel built-in function numbers | Calling an Excel built-in function from your add-in