Situation: an Excel 2010 workbook is created using data from oracle. A data connection is created to achieve this. The excel workbook is then saved as a .xls file so that customers with older versions of office can access it.
Problem: a warning message is displayed when the workbook is opened:
'Security warning Data Connections have been disabled [ Enable content]'.
We think this is shown because the data connection is still present in the workbook. You can go to Data->Connections and remove it, but when the workbook is saved and re-opened, the data connection has come back (although with empty definitions fields).
Things tried: removing all data connections using a macro: no joy. The 'Name Manager' method described here (http://www.mrexcel.com/forum/showthread.php?t=467938) : no joy.
Has anyone else seen this behaviour?
On the Tools menu, click Data Connections. In the Data connections for the form template list, click the data connection that you want to remove. Click Remove.
The data imported through external connections is imported into a table. To unlink the table from data, please:
This should unlink the table and remove any connection related information from the Excel file.
In VBA, you can use the below command:
<sheetname>.ListObjects("<table name>").Unlink
please replace <sheetname>
with the name of the sheet and <tabe name>
with the name of the table that is linked to external data.
I had the same problem today. If after you delete all of the connections, the connection properties still live on. I clicked on properties, deleted the name by selecting the name window and deleting it.
A warning came up to verify I really wanted to do it. After selecting yes, it got rid of the connection. Save the workbook.
I am a hack at Excel but this seemed to work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With