Data Connections in Excel 2007
Every workbook that imports data from an external location uses a data connection to retrieve data from the data source. There are two types of connections in Excel 2007 – Embedded, and Linked connections.
Embedded connection
Embedded connections exist within the file definition of the containing Excel document – they are bundled together. This is useful in scenarios where there is no central data connection library available, or for when you want to deploy a completely standalone solution.
Linked connection
Linked connections are connections that are stored in a separate file with a .odc (Office Data Connection) extension. Using ODC files is good for scenarios where you have many different workbooks that utilize identical data connections. You can deploy the connection file to a central location, where multiple workbooks can access it. If the connection details ever need to be changed, only a single file needs to be updated, rather than updating the connection within every single workbook.
Within Excel both types of connections are utilized in the exact same way, there is no functional difference.
A single connection within an Excel workbook can be both embedded and linked at the same time. Whenever you use the data connection wizard to setup a new connection file, the file is referenced by that connection by default. However if you go into the connection settings within Excel and change any part of the connection, you will get a warning that the connection in the workbook will no longer match the linked connection, and the link to the external connection will be severed.
Optionally, the workbook can be forced to use the linked connection exclusively by checking the “always use connection file” option within the connection properties menu (see screenshot to the right). By doing this, Excel will always reference the external connection- even when it differs from the connection within the file.
The benefit of leaving “always use connection file” unchecked is that if one connection fails for whatever reason, the workbook will try the other one before giving up completely. This gives you two shots at making the connection!