Connection class

Defines the Connection Class.This class is only available in O15. When the object is serialized out as xml, its qualified name is x15:connection.

Inheritance hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.Office15.Excel.Connection

Namespace:  DocumentFormat.OpenXml.Office15.Excel
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(RangeProperties), FileFormatVersions.Office15)> _
<OfficeAvailabilityAttribute(FileFormatVersions.Office15)> _
<ChildElementInfoAttribute(GetType(ModelTextProperties), FileFormatVersions.Office15)> _
<ChildElementInfoAttribute(GetType(TextProperties), FileFormatVersions.Office15)> _
<ChildElementInfoAttribute(GetType(OleDbPrpoperties), FileFormatVersions.Office15)> _
<ChildElementInfoAttribute(GetType(DataFeedProperties), FileFormatVersions.Office15)> _
Public Class Connection _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As Connection
[ChildElementInfoAttribute(typeof(RangeProperties), FileFormatVersions.Office15)]
[OfficeAvailabilityAttribute(FileFormatVersions.Office15)]
[ChildElementInfoAttribute(typeof(ModelTextProperties), FileFormatVersions.Office15)]
[ChildElementInfoAttribute(typeof(TextProperties), FileFormatVersions.Office15)]
[ChildElementInfoAttribute(typeof(OleDbPrpoperties), FileFormatVersions.Office15)]
[ChildElementInfoAttribute(typeof(DataFeedProperties), FileFormatVersions.Office15)]
public class Connection : OpenXmlCompositeElement

Remarks

2.4.47 connection

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/11/main

A CT_Connection element that specifies the extended properties of an external connection.

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this element.

<xsd:element name="connection" type="CT_Connection"/>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

2.6.99 CT_Connection

Target namespace: https://schemas.microsoft.com/office/spreadsheetml/2010/11/main

Referenced by: connection

A complex type that specifies the extended properties of an external connection ([ISO/IEC-29500-1] section 18.13). See section 2.2.4.1 for how this element integrates with the Office Open XML file formats specified in [ISO/IEC-29500-1].

Attributes:

id: An ST_Xstring ([ISO/IEC-29500-1] section 22.9.2.19) attribute that specifies the identifier of the Data Model data source. The string MUST be less than or equal to 65535 characters in length. The string length MUST be equal to zero characters if the sandbox attribute equals "true".

headers: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this text connection has headers. If this element equals "true", the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "103".

sandbox: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this connection is a sandbox connection*.* If this element equals "true", the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "5".

excludeFromRefreshAll: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this connection is not to be refreshed on Refresh All.

autoDelete: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this connection will be automatically deleted when all data features which use it are deleted.

sourceName: An ST_Xstring ([ISO/IEC-29500-1] section 22.9.2.19) attribute that specifies the name of the source range for this connection. The string MUST be less than or equal to 65535 characters in length. If this element exists, the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "102".

The following W3C XML Schema ([XMLSCHEMA1] section 2.1) fragment specifies the contents of this complex type.

<xsd:complexType name="CT_Connection">

<xsd:attribute name="id" use="required" type="x:ST_Xstring"/>

<xsd:attribute name="headers" type="xsd:boolean" default="false" use="optional"/>

<xsd:attribute name="sandbox" type="xsd:boolean" default="false" use="optional"/>

<xsd:attribute name="excludeFromRefreshAll" type="xsd:boolean" default="false" use="optional"/>

<xsd:attribute name="autoDelete" type="xsd:boolean" default="false" use="optional"/>

<xsd:attribute name="sourceName" use="optional" type="x:ST_Xstring"/>

</xsd:complexType>

See section 5.3 for the full W3C XML Schema ([XMLSCHEMA1] section 2.1).

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

Connection members

DocumentFormat.OpenXml.Office15.Excel namespace