How to Combine Multiple CSV Files Into One Excel Table With Power Query
To combine multiple CSV files into one Excel table with Power Query, put all the CSVs in one folder, then use Data > Get Data > From File > From Folder. Power Query reads every file, stacks the rows into a single table, and loads it into Excel. When a new file arrives, drop it in the folder and refresh.
This is different from importing a single CSV. A single import loads one file. A combine loads many files at once and appends them into one table, so twelve monthly sales exports become one yearly table, and fifty store exports become one company table.
If you only need to import one CSV with Power Query, see the guide on importing a CSV into Excel with Power Query. This guide covers the multi-file case: combining, appending, and maintaining a folder of CSVs.
When Combining CSVs Makes Sense
Combining CSVs in Power Query is the right tool when:
- You have recurring exports. Monthly sales, weekly inventory, or daily logs that arrive as separate files.
- The files share the same columns. Each file has the same structure — same headers, same meaning — even if the values differ.
- You want one table for analysis. A single table feeds one pivot table, one chart set, and one set of filters, instead of twelve separate tables.
- New files keep arriving. You want next month's file to join the table with a refresh, not a rebuild.
Combining is less useful when the files have unrelated structures — for example, a customers file and a products file with no shared key. Those belong in separate tables, possibly related in a data model, not stacked into one table.
Before You Combine: Prepare the Folder
Power Query's From Folder step reads every file in the folder you point it at. A little preparation prevents most errors.
One Folder, One Set of Files
- Create a folder for the files you want to combine, such as
Sales-2026. - Move all the CSVs into that folder — and nothing else. A stray text file, an old export, or a backup copy will be picked up too, or will cause an error.
- Use consistent file names. A pattern such as
sales-2026-01.csv,sales-2026-02.csvmakes it easy to see which files are included and in what order. - Keep the folder path stable. Power Query remembers the folder location. If you move the folder later, you will need to update the source step.
Check That the Files Match
Open two or three of the files and compare their headers. The column names should match exactly — "Order Date" in one file and "OrderDate" in another are different columns to Power Query, and the combine will produce both, with blanks where each file lacks the other's column.
Also check:
- Column order. Power Query matches by column name, not position, so different orders are fine as long as names match.
- Data types. A column that is numbers in one file and text in another will need a type fix after combining.
- Encoding. Files saved with different encodings can produce garbled characters. If you see odd symbols, re-save the files with the same encoding (UTF-8 is the usual choice).
- Delimiters. All files should use the same delimiter, usually a comma. A semicolon-delimited file in a comma-delimited folder will load as a single column.
Decide What to Do With Extra Columns
If some files have an extra column — for example, a "Region" column that only appears in newer exports — decide in advance whether to keep it (older files will show blank for that column) or remove it. Power Query keeps all columns by default. You can remove the extra column in the editor if you do not need it.
Step-by-Step: Combine CSVs With From Folder
Step 1: Start From Folder
- In Excel, go to Data > Get Data > From File > From Folder.
- Browse to the folder containing your CSVs and click OK.
- Power Query shows a preview list of the files in the folder — name, extension, date modified, and size. Confirm the list contains exactly the files you want to combine.
Step 2: Combine and Transform
- In the folder preview, click Combine > Combine & Transform Data (in older Excel versions this button is labeled Combine & Edit).
- Power Query shows a sample file and asks how to interpret it: delimiter, data type detection, and whether the first row holds headers.
- Choose Comma as the delimiter, confirm the first row is headers, and click OK.
- Power Query creates two queries behind the scenes: a helper query that reads one file, and a main query that applies those steps to every file and appends the results.
Step 3: Review the Combined Table
The Power Query Editor now shows the combined table. Check:
- Row count. It should roughly equal the sum of the data rows across all files.
- A Source.Name column. Power Query adds a column with the file name each row came from. Keep it — it is the easiest way to trace a row back to its file, and it lets you filter to one file's rows.
- Column types. Confirm dates are dates and numbers are numbers. Fix any column that Power Query guessed wrong.
- Errors. Look for rows marked as errors. A common cause is a file with a different structure. Filter the error rows and check which file they came from using the Source.Name column.
Step 4: Clean Up (Optional but Recommended)
Before loading, apply the cleanup you want for every file at once:
- Remove columns you do not need.
- Rename columns to plain names.
- Standardize values — for example, trim whitespace, fix capitalization, or replace blank values with a standard label.
- Add a helper column if you need one, such as extracting the month from a date column.
Because the cleanup is applied to the combined query, it runs on every file — including files you add later.
Step 5: Close and Load
- Click Close & Load.
- Excel loads the combined table onto a new worksheet as a formatted table.
To confirm the result, compare the loaded row count to the sum of the files' row counts, and spot-check a few rows against their source files using the Source.Name column.
Refreshing When New Files Arrive
This is where the folder method pays off:
- Drop the new CSV into the same folder, using the same naming pattern and the same columns.
- In Excel, click Data > Refresh All.
- Power Query re-reads the folder, includes the new file, applies the same cleanup, and reloads the table.
You do not need to rebuild anything. The new file's rows appear in the table, and any pivot tables or charts built on the table update as well.
If you remove a file from the folder and refresh, its rows disappear from the table. That is expected — the table always reflects the current contents of the folder.
Handling Common Problems
"The File Has Different Columns" Errors
If one file has different headers, Power Query may produce errors or extra columns. Fix it by:
- Opening the offending file (find it via the Source.Name column on an error row).
- Renaming its headers to match the others, or removing the extra column.
- Refreshing.
To prevent this, standardize headers before files enter the folder. A one-minute check per file saves a debugging session later.
Duplicate Rows
If the same file is in the folder twice — for example, sales-2026-01.csv and sales-2026-01-copy.csv — its rows appear twice. Keep only one copy of each file in the folder. To find duplicates after loading, sort by the Source.Name column and look for file names that should not be there.
Mixed Data Types
A column that is numbers in most files but text in one file — for example, a product code column where one file has a code with a leading zero — can cause type errors or lost zeros. After combining, set that column to Text type in the editor, and confirm the values look right. If a file already lost its leading zeros before it entered the folder, re-export that file with the column as text.
Very Large File Sets
Combining hundreds of large CSVs can be slow. If refresh takes too long:
- Split the folder by year or quarter and combine each folder separately.
- Remove columns you do not need before loading, so less data is processed.
- Load the result as a connection-only query and build a pivot table from the data model instead of loading the full table to a sheet.
Files That Are Not CSV
The From Folder preview lists every file in the folder, including non-CSV files. If the folder contains a stray Excel file or a text file, Power Query will try to read it as CSV and fail. Keep the folder clean: CSVs only.
Combining Files With Different Structures
Sometimes the files are similar but not identical — for example, monthly exports where the column set changed mid-year. You have two options:
- Standardize the files first. Rename headers and reorder columns so all files match, then combine. This is the cleanest option when the differences are small.
- Combine and clean after. Let Power Query combine what matches, then fix the leftover columns in the editor — rename, merge, or remove them. This works when only one or two columns differ.
If the files are fundamentally different — different subjects, different keys — do not stack them. Load them as separate tables and relate them in a data model, or summarize each one separately.
Combining CSVs Without Power Query
Power Query is the best tool for recurring combines, but it is not the only one:
- Copy and paste. For two or three small files, open each one, copy its data rows, and paste them under the first file's table. This is fast but does not scale and is easy to get wrong.
- Python with pandas. A short script can read every CSV in a folder, append them, and write one Excel file. This is the best option for very large file sets or for automation on a schedule.
- Online converter workflow. Convert each CSV to Excel with the CSV to Excel converter, then copy each file's sheet into one workbook. This works for one-off jobs but does not refresh when new files arrive.
For a recurring combine, Power Query's refresh behavior is the reason to choose it: add a file, refresh, done.
Comparison: Ways to Combine Multiple CSVs
| Method | Best For | Refreshes? |
|---|---|---|
| Power Query From Folder | Recurring combines with matching columns | Yes — add file, refresh |
| Copy and paste | Two or three small files, one-time job | No |
| Python pandas | Very large file sets, automation | Only by re-running the script |
| Online converter + manual combine | One-off job, no setup | No |
Use Power Query when the combine will repeat. Use copy and paste or an online workflow when it will not.
Frequently Asked Questions
How do I combine multiple CSV files into one Excel sheet?
Put all the CSVs in one folder, then use Data > Get Data > From File > From Folder, choose Combine & Transform Data, confirm the delimiter and headers, and Close & Load. Power Query stacks all the files' rows into one table.
What if my CSV files have different columns?
Standardize the headers before combining, or fix the leftover columns in the Power Query Editor after combining. If the files are fundamentally different, load them as separate tables instead of stacking them.
How do I add a new CSV file to an existing combined table?
Drop the new file into the same folder and click Data > Refresh All. The new file's rows appear in the table automatically, with the same cleanup applied.
Why does my combined table have duplicate rows?
The usual cause is the same file appearing twice in the folder — for example, an original and a copy. Keep only one copy of each file in the folder, then refresh.
Can I combine CSVs on Excel for Mac?
Power Query's From Folder combine flow is a desktop Excel for Windows feature. On a Mac or Chromebook, use copy and paste, a Python script, or convert each file and combine the sheets manually. On a Chromebook, see the guide on converting CSV to Excel on a Chromebook.
Final Checklist
Before you rely on a combined table:
- The folder contains only the CSVs you want to combine, one copy each.
- All files share the same column names.
- Row count equals the sum of the files' data rows.
- The Source.Name column is kept for tracing rows to files.
- Dates are real dates, numbers are numbers, and ID columns are text.
- A refresh after adding a test file brings in the new rows correctly.
- The original files are saved as backups outside the working folder.
If every check passes, your combined table is ready for pivot tables, charts, and reports.