Variant class

Office 2013 and later

Variant. When the object is serialized out as xml, its qualified name is vt:variant.

Namespace:  DocumentFormat.OpenXml.VariantTypes
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

No code example is currently available or this language may not be supported.

[ISO/IEC 29500-1 1st Edition]

variant (Variant)

This element can contain exactly 1 child element of any variant type. This element is only valid as a child element of a vector or array variant type.

[Example: A vector of variant types:

<vt:vector baseType="variant">
  <vt:variant>
    <vt:i4>12</vt:i4>
  </vt:variant>
  <vt:variant>
    <vt:lpstr>WorkSheets</vt:lpstr>
  </vt:variant>
</vt:vector>

end example]

Parent Elements

array (§22.4.2.1); variant (§22.4.2.32); vector (§22.4.2.33)

Child Elements

Subclause

array (Array)

§22.4.2.1

blob (Binary Blob)

§22.4.2.2

bool (Boolean)

§22.4.2.3

bstr (Basic String)

§22.4.2.4

clsid (Class ID)

§22.4.2.5

cy (Currency)

§22.4.2.6

date (Date and Time)

§22.4.2.7

decimal (Decimal)

§22.4.2.8

empty (Empty)

§22.4.2.9

error (Error Status Code)

§22.4.2.10

filetime (File Time)

§22.4.2.11

i1 (1-Byte Signed Integer)

§22.4.2.12

i2 (2-Byte Signed Integer)

§22.4.2.13

i4 (4-Byte Signed Integer)

§22.4.2.14

i8 (8-Byte Signed Integer)

§22.4.2.15

int (Integer)

§22.4.2.16

lpstr (LPSTR)

§22.4.2.17

lpwstr (LPWSTR)

§22.4.2.18

null (Null)

§22.4.2.19

oblob (Binary Blob Object)

§22.4.2.20

ostorage (Binary Storage Object)

§22.4.2.21

ostream (Binary Stream Object)

§22.4.2.22

r4 (4-Byte Real Number)

§22.4.2.23

r8 (8-Byte Real Number)

§22.4.2.24

storage (Binary Storage)

§22.4.2.25

stream (Binary Stream)

§22.4.2.26

ui1 (1-Byte Unsigned Integer)

§22.4.2.27

ui2 (2-Byte Unsigned Integer)

§22.4.2.28

ui4 (4-Byte Unsigned Integer)

§22.4.2.29

ui8 (8-Byte Unsigned Integer)

§22.4.2.30

uint (Unsigned Integer)

§22.4.2.31

variant (Variant)

§22.4.2.32

vector (Vector)

§22.4.2.33

vstream (Binary Versioned Stream)

§22.4.2.34

[Note: The W3C XML Schema definition of this element’s content model (CT_Variant) is located in §A.6.4. end note]

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: