Getting rid of external links in a workbook can be a real headache.
They show up when you attempt to save a file.
An example of saving a template with external links produces the following message:

“This workbook contains external data. Do you want Microsoft Excel to clear the data before saving the template, and then automatically refresh the data whenever the template is opened?”
Delete names that refer to external links:

Select each defined name in turn and check if it points to an external link.
If it does, delete it.
To delete the QueryTable that was created during a data import:
Select the sheet into which the import was done.
Alt+F11 to the VB editor
Ctrl+G to the immediate window
ActiveSheet.QueryTables(1).Delete
