Import CSV Data into Excel Power Query Without Keeping the Source File
Question details
Import CSV data into Excel and use it in Power Query without retaining a dependency on the original CSV file.

- Product
- Microsoft Excel Power Query
- Device & OS
- not provided
- Scenario
- The user wants to keep the imported data in the workbook and apply Power Query transformations after the CSV file is removed.
- Observed behavior
- A query that uses the CSV file as its source cannot refresh when the file is deleted or its path is unavailable.
Make sure the CSV file is accessible for the initial import. Check column types during import, especially for identifiers with leading zeros, so the stored table contains the values you need.
Use an Excel table as the new Power Query source
Keep an independent copy of the imported data in the workbook, then build a new query from that table.
In Excel, select Data > Get Data > From File > From Text/CSV, choose the file, and load the data to a worksheet table.
Select the imported table, including its headers, and copy it. On a new worksheet, use Home > Paste > Values to create a copy that is independent of the original query.
Select the pasted range and choose Insert > Table. Confirm that the table has headers, then select a cell inside it.
Select Data > From Table/Range, apply the transformations you need in Power Query Editor, and choose Close & Load. Load the results to a separate worksheet or location so they do not overwrite the source table.
In Data > Queries & Connections, delete the original CSV-based query once the new query and source table are working. Save the workbook, then refresh the new query to confirm it uses the workbook table rather than the CSV.

Work with CSV and Excel files in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open CSV and Excel files for everyday editing and move between common Office formats. It does not remove or repair an Excel Power Query source dependency.

Frequently Asked Questions
Can I delete the CSV after creating the workbook table?
Yes, once the data has been pasted as values into an independent table and the new query has been confirmed to use that table. Save the workbook and refresh the new query before deleting the CSV.
Will the new query update when the CSV changes?
No. The new query reads the table stored in the workbook. To update its source data, edit or replace the values in that table and refresh the query.
Why should I paste the imported data as values?
Pasting values onto a separate worksheet creates a table that is independent of the original CSV-based query. Use Home > Paste > Values before creating the new table.
Can I remove the table after creating the new query?
No. The table is the new query's source, so it must remain in the workbook for the query to refresh.




