XLL+ Class Library

CXlOper::Coerce

Convert an Excel range into an array of values, forcing a recalculation if necessary

[C++]
int Coerce();
int Coerce(
   const XLREF& xlr
);
int Coerce(
   const XLOPER& xlo
);

Parameters

xlr

A valid reference to an Excel cell range.

xlo

An XLOPER or CXlOper containing at least one range reference.

Return value

The result of the SDK call-back. xlretSuccess (0) indicates success. Other values indicate failure. A full list of return values can be found in the section "Return codes" in the MS SDK header file XLCALL32.H.

Remarks

This function fills the CXlOper object with the values contained in the cells referred to by the parameter. If there are no arguments, and the CXlOper currently contains a cell reference, then that reference will be used.

It is important to note that this function will fail if more than 64 kb of data is contained in the cell range. This is equivalent to about 5400 cells.

Example

CXlOper::Coerce() Example

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::SetValue()