XLL+ Class Library (6.3)

::XlReadScalar

Transform a CXlOper into a single value

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

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.

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.

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