User`s guide
B Data Conversion
B-14
Data Conversion Flags
MATLAB Excel Builder components contain flags to control the conversion of
certain
VARIANT types to MATLAB types.
CoerceNumericToType
This flag tells the data converter to convert all numeric VARIANT data to one
specific MATLAB type.
VARIANT type codes affected by this flag are VT_I1,
VT_UI1, VT_I2, VT_UI2, VT_I4, VT_UI4, VT_R4, VT_R8, VT_CY, VT_DECIMAL,
VT_INT, VT_UINT, VT_ERROR, VT_BOOL, and VT_DATE. Valid values for this flag
are
mwTypeDefault, mwTypeChar, mwTypeDouble, mwTypeSingle,
mwTypeLogical, mwTypeInt8, mwTypeUint8, mwTypeInt16, mwTypeUint16,
mwTypeInt32, and mwTypeUint32. The default for this flag, mwTypeDefault,
converts numeric data according to the rules listed in Table B-3.
InputDateFormat
This flag tells the data converter how to convert VARIANT dates to MATLAB
dates. Valid values for this flag are
mwDateFormatNumeric (default) and
mwDateFormatString. The default converts VARIANT dates according to the rule
listed in Table B-3.
mwDateFormatString converts a VARIANT date to its string
representation. This flag only affects
VARIANT type code VT_DATE.
OutputAsDate As Boolean
This flag instructs the data converter to process an output argument as a date.
By default, numeric dates that are output parameters from compiled MATLAB
functions are passed as
Doubles that need to be decremented by the COM date
AutoResizeOutput
(Applies to Excel ranges only.) When the target output from a method
call is a range of cells in an Excel worksheet and the output array size
and shape is not known at the time of the call, set this flag to
True to
resize each Excel range to fit the output array.
TransposeOutput
Set this flag to True to transpose the output arguments. Useful when
calling an Excel Builder component from Excel where the MATLAB
function returns outputs as row vectors, and you want the data in
columns.
Table B-4: Array Formatting Flags (Continued)
Flag Description