XLL+ Class Library (6.3)

::XlReadScalarEx

Transform a CXlOper into a single value of an extended type

template< class T, class XLT >
void XlReadScalarEx(
   const CXlOper& xlo,
   T& value,
   const CXlUserConverterBase<T, XLT>& outerConverter,
   CScalarConvertParams<T>& params
);
template< class T, class XLT >
void XlReadScalarEx(
   const CXlOper& xlo,
   T& value,
   const CXlUserConverterBase<T, XLT>& outerConverter,
   const wchar_t* argName,
   unsigned long flags = 0,
   const T& defaultValue = T()
);
template< class T, class XLT >
void XlReadScalarEx(
   const XLT& nativeValue,
   T& value,
   const CXlUserConverterBase<T, XLT>& outerConverter,
   CScalarConvertParams<T>& params
);
template< class T, class XLT >
void XlReadScalarEx(
   const XLT& nativeValue,
   T& value,
   const CXlUserConverterBase<T, XLT>& outerConverter,
   const wchar_t* argName
);

Parameters

xlo

A reference to the input passed by Excel.

value

A reference to a variable into which the result will placed, if the conversion is successful.

outerConverter

An instance of the extended type's converter class. See CXlUserConverterBase for details.

params

A set of parameters that control the conversion. See CScalarConvertParams<T> for details.

argName

The name of the argument that is being converted. This will be used in error messages.

flags

A set of flags that control the conversion. See Conversion functions for a list of values.

defaultValue

The default value that will be used for an optional argument, if the argument is omitted by the user.

nativeValue

A reference to the input passed by Excel in its native form.

Remarks

If the function fails for any reason, an exception of type CXlConversionException is thrown. This will be caught by the outer wrapper function, and converted into an appropriate form to be returned to Excel.

Requirements

Header: xlpconvert.h

See Also

Global conversion functions