XLL+ Class Library

Return type

An add-in function can return any of the following types:

CXlOper return values

CXlOper return types have special requirements. The memory pointed to by the return value must remain valid after the function is complete. Local variables cannot therefore be returned directly.

The CXlOper::Ret() can be used to return a valid pointer to a local variable. The function makes a copy of the CXlOper's data in static memory, and a pointer to this memory is returned instead of the local variable.

You can also use the RetError() and RetString() functions to return error or string values directly to Excel.

See Also

Function Wizard