XLL+ Class Library (7.0)


Assigns a 2-dimensional array of numbers to the CXlOper

template< class T >
const CXlOper& FromNumericMatrix(
   const ple::imtx<T>& mat,
   size_t lLBound1 = 0,
   size_t lLBound2 = 0



2-dimensional array of data, contained in an object which supports the imtx interface.

The following types for T are directly supported:

  • long
  • unsigned long
  • int
  • unsigned int
  • short
  • unsigned short
  • double
  • float
This template function will fail to compile for a matrix whose members cannot be cast to double.


Lower bound of the rows of data in the matrix. The first lLBound1 rows of input will be ignored.


Lower bound of the columns of data in the matrix. The first lLBound2 columns of input will be ignored.


This function sets the type of the CXlOper to be a two-dimensional array with the same number of columns and rows as the input matrix, allocates space for the numbers provided and sets the values into the CXlOper.

Note that this method ensures that all integer numeric types are returned to Excel as floating point numbers. To return integer types as boolean values, use CXlOper::FromMatrix2().

The method will throw an exception of type CXlEmptyArrayException if the supplied array is empty, or of type CXlArrayTooLargeException if the array is too large.


Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::operator = | CXlOper::CXlOper | CXlOper::FromNumericVector2