Reads an array argument into a two-dimensional matrix of numbers or strings
[C++]
BOOL ToMatrix(
xlp::matrix<double>& dmat,
CString* psErrorString = 0,
long lFlags = XLA_ARRAY_FLAGS_STD,
double dDefault = 0.0,
USHORT usIgnoreRows = 0,
USHORT usIgnoreCols = 0
) const;
BOOL ToMatrix(
xlp::matrix<CString>& smat,
CString* psErrorString = 0,
long lFlags = XLA_ARRAY_FLAGS_STD,
const char* pszDefault = "",
USHORT usIgnoreRows = 0,
USHORT usIgnoreCols = 0
) const;
A matrix of double, whose contents will be replaced by the contents of the OPER array.
Pointer to an error string buffer. If the function fails for any reason, a useful error string will be placed here, e.g. "expected number in cell 1, 3". Ignored if 0.
Flags controlling the conversion. See matrix and vector flags for a full list of flag values.
Default value to be used when a cell matches the XLA_DEFAULT_ flags provided.
Number of rows at the top of the range to ignore. This can be used to exclude labels from ranges.
Number of columns at the left of the range to ignore. This can be used to exclude labels from ranges.
A matrix of CString, whose contents will be replaced by the contents of the OPER array.
Default value to be used when a cell matches the XLA_DEFAULT_ flags provided.
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 *psErrorString.
This should be returned to the user,
along with the name of the argument that failed.
See the example for more details.
This function extracts a two-dimensional matrix of numbers
or strings from an array argument.
It is reasonably smart: by default it truncates any incomplete columns
or rows from the input range.
Header: xllplus.h