Data Import & Export

Remove a Text File Connection from an Excel Table

Maira MehtabMaira Mehtab Nov 22, 2026 868 views

Question details

Remove the external connection between an Excel table and the text file used to import its data.

Remove a Text File Connection from an Excel Table
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants to stop an Excel table from being linked to its original text-file data source.
Observed behavior
The workbook should no longer retain the unwanted text-file connection or import query.
Before you start

Open the workbook and identify the table and text file involved. Check whether the import appears as a connection, a query, or both before removing it.

Solution 1Recommended

Delete the text-file connection or import query in Excel

Use Excel's data tools to find and remove the workbook's link to the text file.

1
Open the connection pane

In Excel, open the workbook and select Data > Queries & Connections.

2
Find and remove the connection

In the pane, select the Connections tab, locate the text-file connection, and right-click it. Choose Delete and review any confirmation message before proceeding.

3
Check for an import query

Select the Queries tab in the same pane. If a query imports the text file and you no longer need it, right-click the query, select Delete, and review any warning about dependent data or queries.

4
Verify the workbook

Select Data > Existing Connections to check for the unwanted connection, then inspect the table to confirm the data you need is still present.

Delete the text-file connection or import query in Excel
The source file is separate: Deleting the text file alone does not remove a connection stored in the workbook. Removing a connection or query does not delete the original text file.
Free Microsoft Office alternative

Work with Excel Tables in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar interface and support for Microsoft Excel files, making it easy to move existing workbooks into WPS Spreadsheets. Use Excel to manage or remove Excel-specific workbook connections.

Edit and review spreadsheet tables in a familiar interfaceOpen and save compatible Microsoft Excel XLSX and XLS filesMove existing workbook data into a lightweight office suiteUse WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

Will deleting the text file remove its Excel connection?

No. The workbook can retain the connection after the source file is deleted. Open Data > Queries & Connections to locate and remove it.

Where can I find the text-file connection in Excel?

Open Data > Queries & Connections and check both the Connections and Queries tabs. You can also inspect Data > Existing Connections.

Should I delete the query as well as the connection?

If a query imports the text file and you no longer need it, you may also need to remove it from the Queries tab. Review Excel's warning first, especially if other queries or data depend on it.

Does removing the connection delete the original text file?

No. Removing a workbook connection does not delete the source text file. Check the worksheet table after removal to confirm the data you need remains available.