XLL+ Class Library (6.3)

CXlOper::FromMatrix2

Assigns a 2-dimensional array of numbers, booleans or strings to the CXlOper

template< class T >
const CXlOper& FromMatrix2(
   const ple::imtx<T>& mat1,
   size_t lLBound1 = 0,
   size_t lLBound2 = 0,
   bool toBoolean = FALSE
);

Parameters

mat1

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

The following types for T are directly supported:

  • bool
  • long
  • unsigned long
  • int
  • unsigned int
  • short
  • unsigned short
  • double
  • float
  • CString
  • CStringA
  • CStringW
  • std::string
  • std::wstring
Any other type is treated as an enumerated type, and converted first to long and then to a number.

lLBound1

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

lLBound2

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

toBoolean

If TRUE, then the resulting Excel array will contain boolean values instead of numbers.

Remarks

This function sets the type of the CXlOper to be an array, allocates space for the matrix of numbers or strings provided and sets the values into the CXlOper.

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.

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods | CXlOper::operator =