Below is a list of error values that can be returned to Excel as the value of a CXlOper.
| Code | Value | Displayed | Description |
|---|---|---|---|
| xlerrNull | 0 | #NULL! | The function's logic requires an intersection of two areas that do not intersect |
| xlerrDiv0 | 7 | #DIV/0! | Divide by zero |
| xlerrValue | 15 | #VALUE! | Argument is of the wrong type and cannot be coerced to the right type |
| xlerrRef | 23 | #REF! | A cell reference is not valid |
| xlerrName | 29 | #NAME? | A range name is not valid |
| xlerrNum | 36 | #NUM! | The #NUM! error value occurs when a problem occurs with a number in a formula or function. A typical use is for numeric inputs that are out of range. |
| xlerrNA | 42 | #N/A | Data is not currently available |
Below is a list of result codes that can be returned by CXlOper::Excel, CXllApp::Excel, and all methods of CXlMacros and CXlFuncs.
| Code | Value | Description |
|---|---|---|
| xlretSuccess | 0 | The function call was successful. This is not always proof of complete success; in some cases the values returned by the call will need to be inspected: they may contain error types (see above). |
| xlretAbort | 1 | The function call was interrupted by the user. |
| xlretInvXlfn | 2 | The function was not valid or was not valid at this time. |
| xlretInvCount | 4 | The wrong number of arguments was passed. |
| xlretInvXloper | 8 | One of the arguments was invalid. |
| xlretStackOvfl | 16 | Occurs when a call to the Excel SDK API resulted in stack overflow, often as a result of recursion. |
| xlretFailed | 32 | Occurs when a call to the Excel SDK API failed, often because the API is not available at this time. |
| xlretUncalced | 64 | Occurs as a result of a call to the Excel SDK API, when one of the inputs to the function was an uncalculated cell. An add-in function should return immediately; it will be called again later, when the cell has been calculated. |