Export (0) Print
Expand All

2.2.8 External Connections

Office

A workbook often pulls in data from external data sources (1), such as a database or an OLAPcube. An external connection represents a link between a workbook and a particular external data source (1). It contains properties about the way that the application establishes the connection to the data source (1) and retrieves the data, such as the type of data provider (OLE DB, ODBC, and so on), a server name, security information, and a command to execute on the server. In addition, the external connection contains details about the way the connection is used in the workbook, such as how often to refresh the data.

A data connection object contains external connection information for an external data source (1) that a workbook uses. Data connection objects are independent of the constructs in the workbook that display data, such as tables or PivotTables (section 2.2.5).

A connection definition can be established in an external connection file for easier sharing and reuse, but this overview describes the representation for external data connections that are directly embedded within a workbook file. This embedded representation is required whenever external data is used, and ensures portability of the document and continued operation of the external query in the most cases.

An externalconnection is specified by a combination of the records defined in DBQUERY_WORKBOOK (section 2.1.7.20.3), DBQUERY_WORKSHEET (section 2.1.7.20.5), DBQUERYEXT (section 2.1.7.20.5) and SXADDLDBQUERY (section 2.1.7.20.6), and the DConnrecord (section 2.4.84).

If an externalconnection is not used by any workbook object, it is represented only by a DConnrecord (section 2.4.84) and the fStandAlone field of the DConnrecord (section 2.4.84) is set to 1.

Show:
© 2014 Microsoft