XLL+ Class Library (7.0)


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

int Coerce( );
int Coerce(
   const CXlRef& xlr
int Coerce(
   const CXlOper& xlo



A valid reference to an Excel cell range.


A 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 Error Codes.


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 under Excel 2003 and below if more than 64 kb of data is contained in the cell range. This is equivalent to about 5400 cells.


CXlOper::Coerce() Example


Header: xllplus.h

See Also

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