XLL+ Class Library

CXllApp::ErrorToString

Convert an error value to a string.

[C++]
static const char* ErrorToString(
   unsigned short err
);

Parameters

err

An error value (e.g. xlerrValue).

Return value

A pointer to a static string buffer containg the string value of the error, as it would be displayed in Excel, e.g.: #N/A!, #DIV/0! etc.

Remarks

Since this function is static, it is not necessary to use an instance of CXllApp to invoke it. It is not therefore necessary to fix the MFC CWinApp instance using the XLL_FIX_STATE macro: you can use code such as:

CString strResult = CXllApp::ErrorToString(xlerrValue);

Requirements

Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods