The Excel data links that our add-in creates are simply OLEDB data connections. The add-in just helps you create these. Once created, the link is maintained and updated by Excel.
If you access the connection string property of your OLEDB connection object, you can parse it to find the full path to the workfile the data is coming from. I believe there is a Connections collection on the Workbook object. You can loop thru it and then look at the OLEDBConnection.Connection property.
So something like this:
Code: Select all
ActiveWorkbook.Connections("my connection name").OLEDBConnection.Connection
Replace the name with your connection name, or simply loop thru all of your workbook connections and print out the connection property and you'll see the full path to the workfile in the string.