XLL+ Class Library (6.3)

CXlOper::AllocArray

Assigns the CXlOper to be an array, sets it to a size and allocates the memory to contain its items

void AllocArray(
   size_t szRows,
   size_t szCols
);
void AllocArray(
   size_t szRows,
   size_t szCols,
   const CXlOper& xloFill
);

Parameters

szRows

The number of rows to be allocated in the array.

szCols

The number of columns to be allocated in the array.

xloFill

A value which will be used to initialise all the cells in the array.

Remarks

This function sets a CXlOper to be an array and sets its size. It then populates it either with #N/A (first variant), or with xloFill (second variant).

Use this function if you are returning an array of mixed cells, such as strings and numbers in a single array. If you are returning arrays of a single type, then you will find the FromMatrix() and FromVector() functions simpler and quicker to use.

Examples

CXlOper::GetCallerDims() Example | CXlOper::AllocArray() Example | CXlOper::GetCaller() Example | MyMonthsInYear Example

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods