Below is a list of data types accepted by Excel. The entries in the Argument and Result columns indicate whether the data type is supported by the Wizard as an argument to an add-in and a result, respectively.
Code | Name | 'C' Type | Argument | Result | Description |
---|---|---|---|---|---|
A | Boolean | BOOL | Yes | Yes | Boolean value as a 32-bit integer. 1 for true, 0 for false. |
B | Double | double | Yes | Yes | 8-byte double-precision floating point number. |
C | String | const char* | Yes | No | String of ASCII characters, maximum length 255. The length of the string is contained in the first byte. |
C% | String | const wchar_t* | Yes | No | String of Unicode characters, maximum length 32767. The length of the string is contained in the first character. Available under Excel 2007 and above. |
H | Unsigned short integer | USHORT | Yes | Yes | Unsigned 16-bit integer. |
I | Signed short integer | short | Yes | Yes | Signed 16-bit integer. |
J | Signed long integer | long | Yes | Yes | Signed 32-bit integer. |
K | Floating point number array | XLARRAY4 | Yes | No | Array of 8-byte numbers in an XLARRAY structure. |
K% | Floating point number array | XLARRAY12 | Yes | No | Array of 8-byte numbers in an XLARRAY12 structure. Available under Excel 2007 and above. |
P | Value | CXlOper | Yes | No | Excel CXlOper value type. May not contain references. |
Q | Value | CXlOper | Yes | No | Excel CXlOper value type. May not contain references. Available under Excel 2007 and above. |
R | Reference | CXlOper | Yes | Yes | Excel CXlOper reference type. May contain any type including references. |
U | Reference | CXlOper | Yes | Yes | Excel CXlOper reference type. May contain any type including references. Available under Excel 2007 and above. |
Below is a list of data types contained within the CXlOper class. The Enumeration column contains the value of the private xltype member of CXlOper, which can be tested using CXlOper::IsOfType. The method whose name listed in the Test column can be used to determine if the CXlOper is of the given type.
Name | Enumeration | 'C' Type | Test | Description |
---|---|---|---|---|
Boolean | xltypeBool | short int | IsBool() | Boolean value as a 16-bit integer. 1 for true, 0 for false. |
Double | xltypeNum | double | IsDouble() | 8-byte double-precision floating point number. |
String | xltypeStr | char* | IsString() | Under Excel 2003 and below: String of ASCII characters, maximum length 255. The length of the string is contained in the first byte. |
String | xltypeStr | wchar_t* | IsString() | Under Excel 2007 and above: String of Unicode characters, maximum length 32767. The length of the string is contained in the first character. |
Error | xltypeErr | short int | IsError() | Error code. See error codes for a full list. |
Array | xltypeMulti | Array structure | IsArray() | Structure containing a pointer to an array of COper, a column count and a row count. |
Missing | xltypeMissing | IsMissing() | No value was provided; the argument is missing. | |
Reference | xltypeSRef | CXlRef | IsSRef() | Structure describing an Excel rectangular cell range. |
Multi-reference | xltypeMRef | CXlRef* | IsMRef() | Structure describing one or more Excel rectangular cell ranges. |
Empty | 0 | IsEmpty() | Unused or uninitialized value. |