XLL+ Class Library

CXlOper::AllocArray

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

[C++]
void AllocArray(
   USHORT usRows,
   USHORT usCols
);
void AllocArray(
   USHORT usRows,
   USHORT usCols,
   const CXlOper& xloFill
);

Parameters

usRows

The number of rows to be allocated in the array.

usCols

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 | COper::ReadOpt() Examples | CXlOper::AllocArray() Example | CXlOper::GetCaller() Example | MyMonthsInYear Example

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods