Connection class

Office 2013 and later

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

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

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

2.4.43 connection

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

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

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.91 CT_Connection

Target namespace: http://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).<67> See section 2.2.4.1 for how this element integrates with the Office Open XML file formats specified in [ISO/IEC-29500-1].

Child Elements:

modelTextPr: A CT_ModelTextPr element that specifies Model Data Source text importation properties in addition to those specified in textPr element.

If this element is present, then:

the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "103".

Ancestor CT_Connection element MUST contain textPr element.

rangePr: A CT_RangePr element that specifies Model Data Source Worksheet Data connection properties.

If this element is present, then the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "102".

oledbPr: A CT_OledbPr element that specifies Model Data Source OLE DB connection properties.

If this element is present, then the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "100".

dataFeedPr: A CT_DataFeedPr element that specifies Model Data Source Data Feed connection properties.

If this element is present, then the type attribute of the ancestor CT_Connection element, as specified in [ISO/IEC-29500-4] section A.2, MUST be equal to "101".

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".

model: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies whether this connection is a connection to the Spreadsheet Data Model. 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.

usedByAddin: A Boolean ([XMLSCHEMA2] section 3.2.2) attribute that specifies [TYPE HERE]

<<REVIEW>>Flag indicating if this connection is used by Power View addin and must not be automatically deleted with data features using it<<REVIEW>>

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

<xsd:complexType name="CT_Connection">

<xsd:sequence>

<xsd:element name="modelTextPr" minOccurs="0" maxOccurs="1" type="CT_ModelTextPr"/>

<xsd:element name="rangePr" minOccurs="0" maxOccurs="1" type="CT_RangePr"/>

<xsd:element name="oledbPr" minOccurs="0" maxOccurs="1" type="CT_OledbPr"/>

<xsd:element name="dataFeedPr" minOccurs="0" maxOccurs="1" type="CT_DataFeedPr"/>

</xsd:sequence>

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

<xsd:attribute name="model" 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="usedByAddin" type="xsd:boolean" default="false" use="optional"/>

</xsd:complexType>

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

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: