To import data from multiple CSV files into Excel for Microsoft 365 on Windows, put the files in one folder, then choose Data > Get Data > From File > From Folder. Select the folder, choose Combine & Transform Data, check the preview in Power Query, and select Close & Load to create a combined table.
What the folder method does
Power Query is Excel’s built-in tool for connecting to files, cleaning data and combining tables. The From Folder connector reads the files it finds in a selected folder, then lets you combine their contents into one query. This is useful for recurring exports—for example, a monthly sales report saved as Sales-January.csv, Sales-February.csv and Sales-March.csv.
When you choose to combine files, Power Query uses an example file to determine how to interpret the data and creates transformation steps that it applies to the other files. The result is a single table, not a collection of separate worksheets. You can load that table to a worksheet or, where appropriate, to the workbook’s Data Model.
This approach is different from opening each CSV and copying its rows into a master sheet. A query keeps a record of the steps used to combine and shape the data. After you add new files, you can refresh the query rather than repeat the import manually.
Prepare the CSV files first
Combining works most predictably when each file represents the same kind of data and uses a consistent layout. Before importing, check that the files have the same column headings, that each heading appears once, and that the rows below the headings contain records rather than repeated headers or report notes.
- Keep files for this import in a dedicated folder. The folder connector can include files beyond the ones you intended, so avoid mixing unrelated exports into it.
- Use consistent delimiters, such as commas, and consistent text qualifiers. A quoted field can contain a comma without creating a new column, but inconsistent quoting can lead to misread data.
- Check the character encoding if names or symbols display incorrectly. UTF-8 is common, but CSV files can use other encodings.
- Keep column names stable. A renamed or newly added field can require changes to the query’s combine steps.
- Decide whether blank rows, totals, or repeated header rows belong in the final data. Remove unwanted report material in Power Query or at the source.
CSV is a plain-text format, so it does not preserve Excel formatting, formulas as formulas, or multiple worksheets. It stores values separated by delimiters. Dates, decimal separators and leading zeros may therefore need attention during import; for example, an account number such as 00427 should usually remain text rather than become the number 427.
Step-by-step: combine files from a folder
- Save the CSV files in a folder and note its location. If you plan to add files later, use a stable folder rather than a temporary download location.
- In Excel, open the workbook that should contain the combined data. On the Data tab, choose Get Data > From File > From Folder.
- Browse to the folder and select it. The preview lists the files Power Query found. Review the names and extensions before proceeding.
- Choose Combine & Transform Data to inspect and shape the combined result in the Power Query Editor. Choose Combine & Load only if the preview is already suitable and you do not need to adjust the import.
- In the combine prompts, confirm the file type, delimiter and, if offered, the character encoding or sample file. Check that the preview shows the intended columns and rows.
- Use the Power Query Editor to make any necessary changes, such as removing unwanted columns or setting data types. Then choose Home > Close & Load, or use Close & Load To to select a destination.
For a one-time import of a single file, the path is Data > Get Data > From File > From Text/CSV. That opens a preview and offers options to load the data or transform it first. For a folder import, the important choice is to inspect the query before loading so you can confirm how every file is being interpreted.
Shape and verify the combined table
Power Query’s editor lets you clean the data before it reaches the worksheet. Common tasks include removing blank rows, filtering out files or records, renaming columns, splitting a column, and assigning data types. Use the column-type icon in a header to check whether a field is being treated as text, a date, a whole number or another type.
Be especially careful with identifiers and dates. A postal code, product code or customer number may contain leading zeros that Excel would otherwise drop if the column is interpreted as numeric. Dates can be ambiguous when files use different regional conventions—for example, 03/04/2026 can mean March 4 or April 3. Confirm the intended locale and data type rather than relying only on how a value looks in the preview.
It can also help to retain the source filename. Folder-based combine queries often include a source-name column that identifies which file supplied a row. Keep it if you will need to trace an unusual value back to its export, or remove it if it has no use in the final report. Check row counts and sample records against the original files before relying on the result.
A worksheet has a maximum of 1,048,576 rows and 16,384 columns. If the combined output exceeds the worksheet row limit, it cannot all be loaded to one sheet. Depending on the workbook and task, loading to the Data Model or using another data-analysis tool may be more suitable; available capacity depends on the computer and the data.
Refresh the query when files change
After the initial import, save the workbook. When additional matching CSV files arrive, place them in the folder the query reads, then choose Data > Refresh All. Excel reruns the query steps against the current folder contents. You can also right-click the loaded table and choose Refresh.
Refresh does not mean Excel will search every folder on your computer. The query points to the folder location selected when it was created. If files are moved, the folder is renamed, or the workbook is used on another computer where the path is unavailable, the source may need to be changed. To review or edit the connection, open Data > Queries & Connections, then use the query’s options in the pane or open it in Power Query Editor.
For routine reporting, agree on a simple process: put only eligible exports in the input folder, avoid changing their structure, and refresh after the files are in place. If old exports remain in the folder, they may be included again on every refresh. Archive them elsewhere or filter the file list by name or another reliable rule.
Append versus merge: choose the right operation
Combining monthly CSV exports usually means appending: placing rows from one file underneath rows from another. Folder-based Combine is designed for this pattern. It is appropriate when January and February files contain the same kind of records and their columns describe the same fields.
Merging is different. It joins columns from separate tables using a matching field, such as adding a customer’s region to a sales table by customer ID. If each CSV contains a different kind of information, simply appending them may produce many blank cells or a misleading table. In that situation, import the files as separate queries and use a merge operation only when you have a reliable key and understand how unmatched or duplicate keys should behave.
Another common misconception is that Power Query combines files based solely on their column positions. The query’s sample-file transformation and column names influence the result, and inconsistent schemas can cause missing or unexpected fields. Standardize the headers and layout where possible, then inspect the combined preview whenever a source export changes.
Common problems and practical fixes
- Extra rows or repeated headers: Some exports repeat a title or header after every page. Filter those rows out in Power Query, or correct the export process if possible.
- Unexpected files included: Filter the folder file list by extension or filename before combining. A folder containing a notes file or an unrelated CSV can disrupt the result.
- Columns are shifted or joined: Check the delimiter and text qualifier. A semicolon-delimited file should not be interpreted as comma-delimited, and quoted commas should remain inside their field.
- Accented characters look wrong: Recheck the encoding setting in the import or combine step. If the wrong encoding was selected, revisit the query’s source or file interpretation settings.
- Dates or numbers change unexpectedly: Inspect the data type steps and regional assumptions. Set the correct type and locale in Power Query; do not assume a visually plausible date has been interpreted correctly.
- Refresh fails: Confirm that the source folder still exists and that you have permission to read it. Also check whether a file was renamed, removed, or changed to a different layout.
When a refresh error appears, inspect the query’s applied steps and identify the first step that fails. A step that refers to a column by its old name, for instance, may stop working after an export renames that column. Repairing the query or restoring a consistent source header is usually better than repeatedly loading the same broken data.
Excel on Mac and other options
The instructions above target Excel for Microsoft 365 on Windows. Power Query is also available in Microsoft 365 for Mac, but its data-source and authoring support can differ by release. Check the Data tab for the available Get Data or Power Query options. If From Folder is not offered in your Mac version, importing each CSV separately and appending the queries may be possible, or you can run the folder-combine workflow in Excel for Windows.
For a small, one-off task, opening each CSV and copying its rows into a master workbook can be quicker. It is also easier to make a mistake: headers may be copied repeatedly, columns may be pasted out of alignment, and the process must be repeated by hand when new files arrive. Power Query is generally a better fit when the files share a layout or the task will recur.
Excel’s worksheet import is not the right answer for every volume or workflow. Very large datasets, automated pipelines, or data that requires strong audit controls may call for a database, a data platform, or a dedicated ETL tool. For ordinary recurring CSV exports, however, a folder query offers a useful balance: it is built into Excel, records transformation steps, and can be refreshed.
Frequently Asked Questions
Can Excel automatically combine CSV files in a folder?
Yes. Use Data > Get Data > From File > From Folder, combine the files in Power Query, and load the result. To include later files, save them in the queried folder and refresh the workbook.
Do all CSV files need the same column headings?
They should have a consistent structure for the most predictable result. Different or renamed columns can lead to missing values, errors or extra columns, and may require changes to the query. Check the combined preview when the export format changes.
Will new files appear in the table automatically?
Not immediately. The query reads the folder when it runs, so add the new files and then refresh the query or select Data > Refresh All. The files must be in the folder the query uses.
Can I combine files that use different delimiters?
It is possible to build a query that handles different formats, but the standard combine workflow expects a consistent interpretation of the files. If one file uses commas and another uses semicolons, inspect and adjust the import steps or standardize the files before combining.
Does combining CSV files change the original files?
No. Power Query reads the source files and loads a result into the workbook; it does not need to edit the CSV files. The query’s output can be refreshed from the source folder later.
Related
- Excel Data Validation Dynamic List: Setup and Tips
- Excel Data Validation Dependent Drop-Downs: Setup Guide
- Excel Data Validation Custom Lists: Setup and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Make a Booklet in Word: Print and Format ItTo make a booklet in Microsoft Word, open the Page Setup dialog, choose Book fold under Multiple pages,…
- Freeze Just the Top Two Rows in Excel: A Quick GuideTo keep only the top two rows visible while you scroll in Excel for Microsoft 365 on Windows,…
- Create Outlook Rules to Delete Spam Messages AutomaticallyTo create an Outlook rule that deletes recurring spam, open Settings > Mail > Rules in new Outlook…
- How to Add a Bottom Header in Microsoft Word EasilyTo put text at the bottom of a page in Word, add a footer: choose Insert > Footer,…
- Excel Insert Shortcut: Add Cells, Rows, and ColumnsIn Excel for Microsoft 365 on Windows, select the cells, row, or column where you want space, then…
- How to Make a Bifold Brochure in Word, Step by StepTo make a bifold brochure in Microsoft Word, create a two-page landscape document, divide each page into two…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.