[C++]
class COper
A COper object encapsulates the OPER structure. This structure is used by the Excel SDK; specifically, the data type is used to pass data from Excel to add-in functions under the following circumstances:
Passing values which can contain various data types Passing arrays Passing optional arguments
See also Comparison of COper, CXlOper and CXlArray types.
The table below lists the data types supported by the COper class.
Type | 'C' type | Description |
---|---|---|
xlotypeNum | double | IEEE floating-point number (8 bytes) |
xlotypeStr | LPSTR | Zero-terminated ASCII string (limited to 255 characters) |
xlotypeBool | BOOL | Boolean |
xlotypeErr | WORD | Error value. For a full list of error values, see the section Error codes in XLCALL32.H. |
xlotypeMulti | array | Array of OPERs |
xlotypeMissing | void | A missing optional argument, omitted by the user |
COper is the best way to pass arguments from Excel to your XLL if they are of variable type, are arrays or are optional.
CXlOper is the best way to return data from your XLL if the result is of variable type, an array or a string. In particular, error handling can only be satisfactorily managed if the return type is an XLOPER. In addition, CXlOper is the only way to pass cell references from Excel to XLL add-in functions.
See also Comparison of COper, CXlOper and CXlArray types.
Header: xllplus.h