XLL+ Class Library (7.0)

CXlUserConverterBase<ElemType, XlNativeType> Class

The template class for user-defined type converters.

class CXlUserConverterBase<ElemType, XlNativeType>

Overview

To add a new data type to the XLL+ framework, a converter class must be written and registered. All converter classes are derived from CXlUserConverterBase.

Deriving a class from CXlUserConverterBase<ElemType, XlNativeType>

To implement a class derived from CXlUserConverterBase, the developer must provide:

  1. A public constructor with no arguments.
  2. ConvertFromExcel()
  3. One of the following:
    1. GetTypeMessageId
    2. GetTypeNameW
    3. GetTypeName

The developer may also choose to implement ConvertToExcel() so that extended types can be returned to Excel.

See Creating an extended type in the User Guide for more information.

XlNativeType

The table below lists the types available for use as the XlNativeType template argument, along with the type required for the excelType attribute of the <ScalarType> element in the extension file.

excelType attribute XlNativeType
Boolean bool
BOOL
Double double
String CString
CStringA
CStringW
std::tstring
std::string
std::wstring
Short short int
UShort unsigned short int
Int long

Requirements

Header: xlpconvert.h

See Also

CXlUserConverterBase<ElemType, XlNativeType> Methods | xlpconvert.h | Extended types