XLL+ Class Library (7.0)

CXlArray::CXlArray

Constructs a CXlArray object

CXlArray( );
CXlArray(
   LPCXLARRAY4 pxla4
);
CXlArray(
   LPCXLARRAY12 pxla12
);
CXlArray(
   const CXlArray& xla
);
CXlArray(
   size_t cRows,
   size_t cCols
);
CXlArray(
   const double* pd,
   size_t cItems,
   BOOL bRow = FALSE
);
CXlArray(
   double* pd,
   size_t cRows,
   size_t cCols,
   BOOL bByRows = FALSE
);
CXlArray(
   const double* const* apd,
   size_t cRows,
   size_t cCols,
   BOOL bByRows = FALSE
);
CXlArray(
   const xlp::matrix<double>& dmat,
   size_t usIgnoreRows = 0,
   size_t cIgnoreCols = 0,
   BOOL bTranspose = FALSE
);
CXlArray(
   const std::vector<double>& dvec,
   BOOL bRow,
   size_t cIgnoreCols = 0
);

Parameters

pxla4

A pointer to an XLARRAY4 structure, usually passed into an add-in function by Excel 2003 and below.

pxla12

A pointer to an XLARRAY12 structure, usually passed into an add-in function by Excel 2007 and above.

xla

An reference to an initialised CXlArray object, which will be copied.

cRows

The number of rows a newly created array object should contain.

cCols

The number of columns a newly created array object should contain.

pd

An array of double's, containing either cRows items, or (cRows x cCols) items, depending on the function variant used. For the latter type, the values should be arranged in the order specified by the bByRows parameter.

cItems

The number of rows contained in the supplied array of doubles.

bRow

If this is true, then a one-dimensional array will be created as a row; if FALSE, the array will be a column.

cCols

The number of columns contained in the supplied array of doubles.

bByRows

Storage order of arrays of double's. If TRUE, then values in the same row are stored contiguously, otherwise values in the same column are assumed to be stored contiguously.

apd

An array of pointers to double, containing either cRows arrays each of size cCols, or cCols arrays each of size cRows, depending on the order specified by the bByRows parameter.

dmat

A reference to a matrix of doubles. The array in the CXlArray will contain a copy of the matrix.

usIgnoreRows

The number of rows in the supplied matrix to be ignored. This feature is useful if the matrix has been populated by a function which uses 1-based arrays.

cIgnoreCols

The number of columns in the supplied matrix to be ignored. This feature is useful if the matrix has been populated by a function which uses 1-based arrays.

bTranspose

If TRUE, then the data in the matrix is transposed before it is placed in the CXlArray. If FALSE, it is not.

dvec

A reference to a vector of doubles. The array in the CXlArray will contain a copy of the matrix.

cIgnoreCols

The number of items in the supplied vector to be ignored. This feature is useful if the vector has been populated by a function which uses 1-based arrays.

Exceptions

If memory allocation fails, then an exception of type CXlMemoryAllocationFailedException will be thrown. Since this exception is derived from CXlRuntimeException, it will be caught by the add-in wrapper function when this method is called from within an add-in function.

Requirements

Header: xllplus.h

See Also

CXlArray Class | CXlArray Methods