Power Query Problems

Change an Excel Power Query Source from a File to a Folder

Olivia MillerOlivia Miller Nov 18, 2026 869 views

Question details

Change an existing Power Query that imports one Excel file so it can combine multiple Excel files from a folder.

Change an Excel Power Query Source from a File to a Folder
Product
Microsoft Excel Power Query
Device & OS
not provided
Scenario
The user wants to apply an existing query's transformations to multiple Excel workbooks stored in one folder.
Observed behavior
The desired result is a combined table that includes data from the folder's workbooks and can be refreshed as files change.
Before you start

Place the source workbooks in a folder and check that they have consistent sheet or table names and column layouts. Note the existing query's transformation steps so you can reuse the relevant logic.

Solution 1Recommended

Create a Folder Query and Reuse Existing Transformations

Use the Folder connector to combine workbooks, then adapt the original query's transformation logic for each file.

File and Folder connectors produce different source steps. Changing a file path in Data Source Settings alone does not convert a file query into a folder query.

1
Create the folder source

In Excel, select Data > Get Data > From File > From Folder. Browse to the folder containing the workbooks and select Open.

2
Combine the workbooks

In the folder preview, select Combine & Transform Data. Choose a representative sample file and the sheet or table to import, then select OK.

3
Review the generated queries

In Power Query Editor, inspect the combined query and the generated Transform Sample File query. Check that the sample produces the expected columns.

4
Reuse transformation logic

Open the original query and review its Applied Steps or Home > Advanced Editor. Recreate or adapt relevant transformation steps in the generated sample-file transformation query, after its source and navigation steps.

5
Load and refresh

Check the combined preview, then select Home > Close & Load. After adding or changing source files, use Data > Refresh All in Excel.

Create a Folder Query and Reuse Existing Transformations
Check the folder contents: The Folder connector can include files in subfolders. Filter the file list before combining if it contains workbooks or other files you do not want to import.
Free Microsoft Office alternative

Work with Excel Files in WPS Spreadsheets

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface for opening and editing Excel files. Its format compatibility helps you move existing workbooks into WPS, although it does not fix or replace Excel's Power Query connector.

Open and edit Microsoft Excel XLS and XLSX filesUse familiar spreadsheet tools to review source workbooksMove existing Office documents into a familiar interfaceWork with a free, lightweight Office alternative
microsoft office alternative - wps office

Frequently Asked Questions

Can I change a single-file query to a folder query in Data Source Settings?

Data Source Settings can change a source location, but it does not by itself replace the file connector with the Folder connector. Create a new query through Data > Get Data > From File > From Folder instead.

Can I keep the transformations from my original query?

Often, yes. Review the original query's Applied Steps or Home > Advanced Editor, then adapt the relevant transformations in the generated Transform Sample File query. Keep the folder query's generated source and navigation steps.

What happens when I add another workbook to the folder?

Use Data > Refresh All in Excel to refresh the folder query. A new workbook will be included if it passes the query's file filters and has the expected structure.

Why does combining files produce errors?

A workbook may be missing the selected sheet or table, have different columns, or not be a valid source file. Check the folder preview and filter unwanted files, then compare the problem workbook with the sample file.