Power Query Problems

Combine Text Files from a Folder in Excel 2016

Steve KSteve K Nov 25, 2026 868 views

Question details

The user wants to combine text files from a folder into one Excel worksheet and refresh the data weekly.

Combine Text Files from a Folder in Excel 2016
Product
Microsoft Excel 2016 Power Query
Device & OS
not provided
Scenario
Append two text files into a single data range for a PivotTable, with updates when the source files change.
Observed behavior
The folder query initially displays file names and metadata rather than the contents of the text files.
Before you start

Place the text files in a dedicated folder and check that they have compatible columns, headers, and delimiters. Remove unrelated files from the folder so they are not included in the query.

Solution 1Recommended

Combine folder files with Power Query in Excel 2016

Use the folder connector to append compatible text files and load their contents into a worksheet.

1
Connect to the folder

In Excel, select Data > New Query > From File > From Folder. Browse to the folder and confirm the selection.

2
Open Power Query Editor

When the file list appears, select Edit. The rows show file names and metadata, while the Content column contains each file's data.

3
Combine the files

Select the combine-files double-arrow icon in the Content column. If prompted, choose a sample file and set the appropriate delimiter and other import options.

4
Check and load the data

Review the combined columns in Power Query Editor, adjust headers or data types if needed, and select Home > Close & Load to load the results into Excel.

5
Create and refresh the PivotTable

Select a cell in the loaded table and choose Insert > PivotTable. After updating the source files, use Data > Refresh All; if the PivotTable does not reflect the updated query, right-click it and select Refresh.

Combine folder files with Power Query in Excel 2016
CSV is not required: Power Query can combine other delimited text files, such as TXT files, when their structures and import settings are compatible. CSV is often convenient because its delimiter and tabular structure are easy to identify.
Free Microsoft Office alternative

Work with spreadsheet data in WPS Office

WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and work with imported tabular data as you move between office suites. It does not fix Excel's Power Query folder connector.

Review and organize tabular data in WPS SpreadsheetsOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar interface for an easier transition from ExcelGet a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why does the folder query show file names instead of file contents?

The folder connector first lists files and their metadata. Select Edit, then use the combine-files icon in the Content column to open and combine their contents.

Do the source files have to be CSV files?

No. Power Query can also combine other delimited text files, such as TXT files. Choose the correct delimiter during import and ensure the files have compatible structures.

How do I update the combined data each week?

Update or add compatible files in the same source folder, open the workbook, and select Data > Refresh All. Refresh the PivotTable separately if it does not reflect the updated query.

What should I check if the combined columns look wrong?

Open the query in Power Query Editor and check the delimiter, headers, and data types. Also confirm that the source files use compatible columns and contain no unrelated files.