Power Query Problems

Change the Source Workbook in Excel Power Query

Chanuka GeekiyanageChanuka Geekiyanage Nov 14, 2026 869 views

Question details

Change the Excel workbook used by an existing Power Query without recreating its transformations.

Change the Source Workbook in Excel Power Query
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
An existing query needs to read from a different Excel workbook while retaining its transformation steps.
Observed behavior
The user wants the existing query to use the new workbook rather than create a separate query and repeat the transformations.
Before you start

Locate the full path of the new workbook and check that it contains the sheet or table names and columns used by the existing query. Different names or structures may require changes to later query steps.

Solution 1Recommended

Change the workbook path in Advanced Editor

Use this method to edit the source path directly in the existing query and keep its transformation steps.

1
Open the existing query

In Excel, select Data > Queries & Connections, then double-click the existing query to open Power Query Editor.

2
Edit the source path

Select Home > Advanced Editor. Find the workbook path in the Excel.Workbook(File.Contents(...)) source expression and replace it with the full path to the new workbook, keeping the quotation marks.

3
Apply and check the query

Select Done, then review Applied Steps and the data preview. If a step reports an error, check that the referenced sheet or table and columns exist in the new workbook.

4
Load the updated results

Select Home > Close & Load to apply the change to the existing query, then refresh it if needed.

Change the workbook path in Advanced Editor
Existing steps remain in place: Changing the path preserves the query steps, but those steps can fail if the new workbook has a different structure. If the source path comes from a parameter or another query, update that source instead.
Free Microsoft Office alternative

Work with Excel workbooks in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface and support for Excel formats, making it easier to move everyday workbook editing to WPS. Changing an existing Microsoft Power Query source should still be done in Excel.

Open and edit spreadsheet data in a familiar interfaceCompatible with Microsoft Excel formats, including XLSXReview workbook sheets and columns before using them as a query sourceFree and lightweight for everyday office tasks
microsoft office alternative - wps office

Frequently Asked Questions

Will changing the source path delete my Power Query steps?

Changing the path in Home > Advanced Editor or through Data Source Settings keeps the existing steps. However, steps may need adjustment if the new workbook has different sheet, table, or column names.

Why did I get a second query when I chose New Source?

New Source can create a separate query. To update the original query instead, open it from Data > Queries & Connections and change its source path in Advanced Editor or Data Source Settings.

What if the new workbook has a different sheet name?

In Power Query Editor, check the Navigation step under Applied Steps. Update the sheet or table reference to match the new workbook, then review later steps for column differences.

What should I do if Power Query asks for credentials after the change?

Follow the credentials prompt for the new source, or open File > Options & Settings > Data Source Settings in Power Query Editor to review its permissions.