Reads data from a 2-dimensional array into a matrix of numbers
[C++]
BOOL ReadMatrix(
ple::imtx<double>& mat1,
const char* pszArgName,
CString& strError,
long* plUBound1 = 0,
long* plUBound2 = 0,
long lFlags = XLA_ARRAY_FLAGS_STD,
long lLBound1 = 0,
long lLBound2 = 0,
long lIgnoreRows = 0,
long lIgnoreCols = 0
) const;
BOOL ReadMatrix(
ple::imtx<double>& mat1,
const char* pszArgName,
CXlOper& xloError,
long* plUBound1 = 0,
long* plUBound2 = 0,
long lFlags = XLA_ARRAY_FLAGS_STD,
long lLBound1 = 0,
long lLBound2 = 0,
long lIgnoreRows = 0,
long lIgnoreCols = 0
) const;
BOOL ReadMatrix(
xlp::matrix<double>& mat2,
const char* pszArgName,
CString& strError,
long* plUBound1 = 0,
long* plUBound2 = 0,
long lFlags = XLA_ARRAY_FLAGS_STD,
long lLBound1 = 0,
long lLBound2 = 0,
long lIgnoreRows = 0,
long lIgnoreCols = 0
) const;
BOOL ReadMatrix(
xlp::matrix<T>& mat2,
const char* pszArgName,
CXlOper& xloError,
long* plUBound1 = 0,
long* plUBound2 = 0,
long lFlags = XLA_ARRAY_FLAGS_STD,
long lLBound1 = 0,
long lLBound2 = 0,
long lIgnoreRows = 0,
long lIgnoreCols = 0
) const;
A matrix containing data of type double, whose contents will be replaced by the contents of the CXlArray.
The name of the argument that is being read. This will be used in any error strings that are generated.
Reference to an error string buffer. If the function fails for any reason, a useful error string will be placed here, e.g. "MyArgName: expected number in cell 3, 2".
Pointer to upper bound of first dimension (height). If it is null, then it is ignored. If it is not null then it is used to check that the upper bounds of various arrays are consistent.
See Bounded input arrays for more information on the use of upper bounds.
Pointer to upper bound of second dimension (width). If it is null, then it is ignored. If it is not null then it is used to check that the upper bounds of various arrays are consistent.
See Bounded input arrays for more information on the use of upper bounds.
Flags controlling the conversion. See matrix & vector flags for a full list of flag values.
This will be used as a lower bound in the output matrix. lLBound rows containing default values (zero or blank) will be inserted at the start of the output matrix.
This will be used as a lower bound in the output matrix. lLBound columns containing default values (zero or blank) will be inserted at the start of the output matrix.
The first lIgnoreRows rows of input will be ignored. This option can be useful for excluding labels.
The first lIgnoreCols columns of input will be ignored. This option can be useful for excluding labels.
If any error occurs, a description will be put into xloError. It can then conveniently be returned as the result of the add-in function.
A matrix of the deprecated class matrix<double>, containing items of type double, whose contents will be replaced by the contents of the CXlArray.
The function returns TRUE if the conversion was successful,
FALSE if it failed for any reason. If it fails, an explanatory error string will be written
to strError or xloError.
This should be returned to the user.
This function extracts a rectangular range of numbers from an array argument. However, a wide variety of other options are available, if you use other flag values
and optional arguments.
See matrix & vector flags for a full list of flag values. See Bounded input arrays
for more information on the use of upper bounds.
Header: xllplus.h