XLL+ Class Library (7.0)


Convert an error value to a string.

static const TCHAR* ErrorToString(
   unsigned short 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.


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);


Header: xllplus.h

See Also

CXllApp Class | CXllApp Methods