XLL+ Class Library (6.3)

ple::clr::toClrObjectVector

Transform an Excel vector containing values of unknown type to a one-dimensional CLR object array

array<System::Object^, 1> toClrObjectVector(
   const CXlOper& xloValue,
   const wchar_t* argName
);

Parameters

xloValue

An array value received from Excel. This can be a single cell, or a vector of cells.

Note: if this value is specified as a parameter of the add-in function, it must be of type "Value", and not type "Reference". If the parameter has been passed as type "Reference", then the value must be extracted, using CXlOper::Coerce().

argName

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

Return Value

A one-dimensional CLR object array, that may be passed directly to a .NET method, using C++/CLI.

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: xlpclrconvert.h

See Also

Common Language Runtime support functions | toClr | toClrObject | toClrObjectMatrix