XLL+ Class Library (7.0)

CXlOper::CXlOper

Constructs a CXlOper object

CXlOper( );
CXlOper(
   const CXlOper& xlo
);
CXlOper(
   XLOPER4* xlop4
);
CXlOper(
   XLOPER12* xlop12
);
CXlOper(
   double d
);
CXlOper(
   XlErrorType xlerr
);
CXlOper(
   BOOL wboolean
);
CXlOper(
   bool boolean
);
CXlOper(
   const CString& str
);
CXlOper(
   const char* psz
);
CXlOper(
   const CStringA& astr
);
CXlOper(
   const std::string& str_stl
);
CXlOper(
   const wchar_t* wpsz
);
CXlOper(
   const CStringW& wstr
);
CXlOper(
   const std::wstring& wstr_stl
);
CXlOper(
   const CXlStringArg& str_arg
);
CXlOper(
   int i,
   int nDummy
);
CXlOper(
   const double* pd,
   size_t cRows
);
CXlOper(
   const double* pd,
   size_t cRows,
   size_t cCols,
   BOOL bByRows = FALSE
);
CXlOper(
   const double* const* apd,
   size_t cRows,
   size_t cCols,
   BOOL bByRows = FALSE
);
CXlOper(
   const long* pl,
   size_t cRows
);
CXlOper(
   const long* pl,
   size_t cRows,
   size_t cCols,
   BOOL bByRows = FALSE
);
CXlOper(
   const long* const* apl,
   size_t cRows,
   size_t cCols,
   BOOL bByRows = FALSE
);
CXlOper(
   const xlp::matrix<double>& dmat
); [Deprecated]
CXlOper(
   const xlp::matrix<CString>& smat
); [Deprecated]
CXlOper(
   const std::vector<double>& dvec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<bool>& bvec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<std::string>& strvec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<std::wstring>& wstrvec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<CString>& svec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<std::CStringA>& asvec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<std::CStringW>& wsvec,
   BOOL bRow = FALSE,
   long lBound = 0
);
CXlOper(
   const std::vector<long>& lvec,
   BOOL bRow = FALSE,
   long lBound = 0,
   BOOL toBoolean = FALSE
);

Parameters

xlo

A reference to a CXlOper instance, which will be deep-copied to this object.

xlop4

A pointer to an initialised OPER4, as passed by Excel 2003 and below.

xlop12

A pointer to an initialised OPER12, as passed by Excel 2007 and above.

d

A double-precision floating-point number.

xlerr

An error number (see also Error Values).

wboolean

A boolean value: TRUE (1) or FALSE (0).

boolean

A boolean value: true or false.

str

A reference to a CString, which will be copied into the value of the new object.

psz

A pointer to a null-terminated ASCII string.

Note that under Excel 2007 and above, the string will be converted to Unicode.

astr

A reference to a CStringA, which will be copied into the value of the new object.

Note that under Excel 2007 and above, the string will be converted to Unicode.

str_stl

A reference to a STL std::string, which will be copied into the value of the new object.

Note that under Excel 2007 and above, the string will be converted to Unicode.

wpsz

A pointer to a null-terminated wide-character string.

Note that under Excel 2003 and below, the string will be converted to a multi-byte character ASCII string, and will be truncated to 255 bytes.

wstr

A reference to a CStringW, which will be copied into the value of the new object.

Note that under Excel 2003 and below, the string will be converted to a multi-byte character ASCII string, and will be truncated to 255 bytes.

wstr_stl

A reference to a STL std::wstring, which will be copied into the value of the new object.

Note that under Excel 2003 and below, the string will be converted to a multi-byte character ASCII string, and will be truncated to 255 bytes.

str_arg

A reference to a CXlStringArg passed to an add-in function by Excel, which will be copied into the value of the new object.

Note that under Excel 2003 and below, the string will be a multi-byte character ASCII string, and will be limited to 255 bytes. Under Excel 2007 and above, the string is Unicode and is limited to 32,767 characters.

i

An integer value. This constructor creates an XLOPER variant which is of use only in calls to the Excel SDK.

nDummy

Ignored. This dummy parameter is required in order to distinguish the integer constructor from other more frequently used numeric constructors.

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.

cRows

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

cCols

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

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.

pl

An array of long'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.

apl

An array of pointers to long, 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 CXlOper will contain a copy of the matrix.

smat

A reference to a matrix of CStrings. The array in the CXlOper will contain a copy of the matrix.

dvec

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

bRow

If TRUE, then the vector created will be a row; otherwise the vector will be a column.

lBound

The number of items at the start of the input vector which will be ignored. This is useful for vectors created with a lower bound (usually 1).

bvec

A reference to a vector of booleans. The array in the CXlOper will contain a copy of the vector.

strvec

A reference to a vector of std::string's. The array in the CXlOper will contain a copy of the vector.

wstrvec

A reference to a vector of std::wstring wide character strings. The array in the CXlOper will contain a copy of the vector.

svec

A reference to a vector of CStrings. The array in the CXlOper will contain a copy of the vector.

asvec

A reference to a vector of CStringA ASCII strings. The array in the CXlOper will contain a copy of the vector.

wsvec

A reference to a vector of CStringW wide-character strings. The array in the CXlOper will contain a copy of the vector.

lvec

A reference to a vector of long integers. The array in the CXlOper will contain a copy of the vector. Depending on the value of toBoolean, each cell will be converted to either a boolean value or a double.

toBoolean

If TRUE, then the resulting Excel array will contain boolean values instead of numbers. Any non-zero value will be converted to TRUE, and zero values will be converted to FALSE.

Remarks

The vector and matrix versions of the constructor will throw an exception of type CXlEmptyArrayException if the supplied array is empty, or of type CXlArrayTooLargeException if the array is too large.

Example

MyUpper Example

Requirements

Header: xllplus.h

See Also

CXlOper Class | CXlOper Methods