VTVector Class

Vector.When the object is serialized out as xml, its qualified name is vt:vector.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.VariantTypes.VTVector

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(VTUnsignedShort))> _
<ChildElementInfoAttribute(GetType(VTDouble))> _
<ChildElementInfoAttribute(GetType(VTClipboardData))> _
<ChildElementInfoAttribute(GetType(VTByte))> _
<ChildElementInfoAttribute(GetType(VTShort))> _
<ChildElementInfoAttribute(GetType(VTInt32))> _
<ChildElementInfoAttribute(GetType(VTInt64))> _
<ChildElementInfoAttribute(GetType(VTUnsignedByte))> _
<ChildElementInfoAttribute(GetType(VTUnsignedInt32))> _
<ChildElementInfoAttribute(GetType(VTUnsignedInt64))> _
<ChildElementInfoAttribute(GetType(VTFloat))> _
<ChildElementInfoAttribute(GetType(Variant))> _
<ChildElementInfoAttribute(GetType(VTLPSTR))> _
<ChildElementInfoAttribute(GetType(VTLPWSTR))> _
<ChildElementInfoAttribute(GetType(VTBString))> _
<ChildElementInfoAttribute(GetType(VTDate))> _
<ChildElementInfoAttribute(GetType(VTFileTime))> _
<ChildElementInfoAttribute(GetType(VTBool))> _
<ChildElementInfoAttribute(GetType(VTCurrency))> _
<ChildElementInfoAttribute(GetType(VTError))> _
<ChildElementInfoAttribute(GetType(VTClassId))> _
Public Class VTVector _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As VTVector
[ChildElementInfoAttribute(typeof(VTUnsignedShort))]
[ChildElementInfoAttribute(typeof(VTDouble))]
[ChildElementInfoAttribute(typeof(VTClipboardData))]
[ChildElementInfoAttribute(typeof(VTByte))]
[ChildElementInfoAttribute(typeof(VTShort))]
[ChildElementInfoAttribute(typeof(VTInt32))]
[ChildElementInfoAttribute(typeof(VTInt64))]
[ChildElementInfoAttribute(typeof(VTUnsignedByte))]
[ChildElementInfoAttribute(typeof(VTUnsignedInt32))]
[ChildElementInfoAttribute(typeof(VTUnsignedInt64))]
[ChildElementInfoAttribute(typeof(VTFloat))]
[ChildElementInfoAttribute(typeof(Variant))]
[ChildElementInfoAttribute(typeof(VTLPSTR))]
[ChildElementInfoAttribute(typeof(VTLPWSTR))]
[ChildElementInfoAttribute(typeof(VTBString))]
[ChildElementInfoAttribute(typeof(VTDate))]
[ChildElementInfoAttribute(typeof(VTFileTime))]
[ChildElementInfoAttribute(typeof(VTBool))]
[ChildElementInfoAttribute(typeof(VTCurrency))]
[ChildElementInfoAttribute(typeof(VTError))]
[ChildElementInfoAttribute(typeof(VTClassId))]
public class VTVector : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • Variant <vt:variant>

  • VTByte <vt:i1>

  • VTShort <vt:i2>

  • VTInt32 <vt:i4>

  • VTInt64 <vt:i8>

  • VTUnsignedByte <vt:ui1>

  • VTUnsignedShort <vt:ui2>

  • VTUnsignedInt32 <vt:ui4>

  • VTUnsignedInt64 <vt:ui8>

  • VTFloat <vt:r4>

  • VTDouble <vt:r8>

  • VTLPSTR <vt:lpstr>

  • VTLPWSTR <vt:lpwstr>

  • VTBString <vt:bstr>

  • VTDate <vt:date>

  • VTFileTime <vt:filetime>

  • VTBool <vt:bool>

  • VTCurrency <vt:cy>

  • VTError <vt:error>

  • VTClassId <vt:clsid>

  • VTClipboardData <vt:cf>

[ISO/IEC 29500-1 1st Edition]

22.4.2.33 vector (Vector)

This element defines the vector variant type. Vector contents shall be of uniform type as specified by the baseType attribute. The contents of a vector are defined using repeated child elements of the appropriate variant type.

[Example: A vector of lpstr variant types:

<vt:vector baseType="lpstr">
<vt:lpstr>One</vt:lpstr>
<vt:lpstr>Two</vt:lpstr>
<vt:lpstr>Three</vt:lpstr>
</vt:vector>

end example]

Parent Elements

HeadingPairs (§22.2.2.8); HLinks (§22.2.2.10); property (§22.3.2.2); TitlesOfParts (§22.2.2.26); variant (§22.4.2.32)

Child Elements

Subclause

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

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

lpstr (LPSTR)

§22.4.2.17

lpwstr (LPWSTR)

§22.4.2.18

r4 (4-Byte Real Number)

§22.4.2.23

r8 (8-Byte Real Number)

§22.4.2.24

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

variant (Variant)

§22.4.2.32

Attributes

Description

baseType (Vector Base Type)

The baseType attribute specifies the base variant type of a vector.

The allowed values are: variant, i1, i2, i4, i8, ui1, ui2, ui4, ui8, r4, r8, lpstr, lpwstr, bstr, date, filetime, bool, cy, error, and clsid.

The possible values for this attribute are defined by the ST_VectorBaseType simple type (§22.4.3.4).

size (Vector Size)

Specifies the number of elements in the vector.

The possible values for this attribute are defined by the W3C XML Schema unsignedInt datatype.

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

© ISO/IEC29500: 2008.

Thread Safety

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

See Also

Reference

VTVector Members

DocumentFormat.OpenXml.VariantTypes Namespace