To import 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 and choose Combine & Transform Data to append compatible files into one refreshable table; use Data > From Text/CSV instead when you want to import files separately.
What happens when Excel combines CSV files
Excel’s Power Query feature can read every matching file in a folder, apply the same transformation steps to each, and append the rows into a single result. Appending means stacking records vertically: a file with 500 rows and another with 300 rows produces a combined result with roughly 800 data rows, plus one header row if the files share a header. It does not place each file in a separate worksheet, nor does it join records side by side based on a matching ID.
The folder method is especially useful for recurring reports. If a system exports a new CSV each week, you can save each export in the designated folder and refresh the query instead of repeating the import manually. Power Query remembers the source and the transformations, such as removing unwanted columns or converting a date field.
For the cleanest combination, files should have the same column names and broadly consistent structure. They do not necessarily need to have the same number of rows. A missing column or a different header can produce blanks or unexpected fields, so review the output rather than assuming every file matched perfectly.
Prepare the files and folder
Before connecting, create a folder specifically for the CSV files you want to combine. Keep unrelated documents and old exports elsewhere. The folder connector can return many files from its selected location, and depending on the folder structure and query, files in subfolders may also be included. A dedicated source folder makes it easier to control what enters the result.
- Check that the files use the same header names and represent the same kind of records.
- Make sure each file uses a consistent delimiter, such as a comma or semicolon.
- Look for inconsistent date formats, extra title rows, blank lines, or totals at the bottom of some files.
- Keep a backup of the source files; importing them does not replace the originals.
- Use a predictable naming pattern, such as sales_2026-10.csv, if you need to identify each source later.
A CSV file is plain text containing delimited values, not a full Excel workbook. It cannot preserve worksheet formatting, formulas as functioning Excel formulas, multiple tabs, or workbook features such as charts. If the source system has meaningful information in separate worksheets, export those data sets separately or use a workbook-based import instead.
Combine a folder of CSV files in Power Query
- Open a blank workbook or the workbook where the result should live. On the Data tab, select Get Data > From File > From Folder.
- Browse to the folder containing the CSV files and confirm the selection. Excel displays a list or preview of the files it found.
- Check that the listed files are the ones you intend to combine. If the folder includes unrelated files, use the available filter or cancel and move those files to another location.
- Choose Combine > Combine & Transform Data, or the similarly named Combine & Transform Data button shown in the preview. If prompted to choose a sample file or settings, confirm that the preview uses the correct delimiter and that the first row is treated as headers when appropriate.
- In the Power Query Editor, review the combined preview and the Applied Steps list. Remove unwanted columns or rows, correct data types, and check that the column headings are sensible.
- Select Home > Close & Load to put the result into Excel. If you need to choose where it goes or whether it loads as a table, use the Close & Load options available in your Excel build.
Power Query typically creates a main query for the combined result along with helper queries that describe how to process each file. Those supporting queries are part of the combine process; avoid deleting them unless you understand how the main query depends on them. The loaded table is the output you work with in the worksheet, while the query steps remain available for later editing.
Import files separately instead of combining them
If each CSV belongs on its own worksheet, import each one individually. Select Data > From Text/CSV, choose a file, inspect the preview, and select Load to bring it into the workbook. Choose Transform Data if the delimiter, encoding, column types, or other settings need attention before loading. Repeat the process for each file, and rename the resulting sheets or tables so their contents are clear.
Separate imports are often preferable when files have different columns, cover different subjects, or need different cleanup. They also make it easier to compare files without losing which records came from which original. The trade-off is maintenance: a new file usually requires another import or a deliberate change to the workbook’s query setup.
Do not confuse combining with a relational merge. Combining appends rows from similar files. A merge matches records across tables using one or more columns, such as a customer ID, and brings related fields together. In Power Query, those are different operations. If one CSV contains orders and another contains customer details, first decide whether you need one list of records or a match between the two data sets.
Check headers, delimiters, encoding, and data types
CSV files can look simple while still differing in important ways. A comma-separated file may contain quoted text that itself includes commas; a properly parsed CSV keeps that text within one field. Some regional settings or applications use semicolons as separators instead. If the preview shows a whole row in one column, or splits values into the wrong columns, inspect the delimiter setting before loading.
Encoding affects how characters appear. Names or addresses with accents can become garbled if Excel reads a file using an unsuitable encoding. In the Text/CSV preview, check the encoding or file origin option and choose an appropriate setting, such as UTF-8 when that matches the source. The exact choices shown can vary with the import route and Excel build.
Pay particular attention to identifiers. A postal code, product code, or account number such as 00127 is text-like information, even if it contains only digits. If Excel converts it to a number, leading zeros disappear. In Power Query, select the relevant column and set its data type to Text before loading. Similarly, verify dates and decimal values when files were created in different regional formats; a value such as 04/05/2026 can be interpreted differently depending on the intended date convention.
Some exports contain a report title above the headers, repeated header rows within the data, or a summary total at the end. A combine query may treat these as ordinary records unless you remove or filter them. Check several rows from different source files, not just the first few rows of the combined preview.
Refresh the result when new files arrive
Once the query is loaded, adding another compatible CSV to the same source folder can make it part of the next refresh. In Excel, use Data > Refresh All, or refresh the individual query from the Queries & Connections pane. The query re-reads its source and reapplies its saved steps. Refresh is not the same as editing the original CSV: it updates the workbook’s query output from the files currently available.
For predictable refreshes, keep the folder path stable and avoid changing the column structure. If you move the folder, the query may no longer find it; edit the source location in the query settings or recreate the connection. If you remove a file, its records generally disappear from the refreshed result because the query reads the current folder contents. Save the workbook after refreshing if you need to retain the updated table in the file.
When you want to track where a row came from, retain the source filename during the Power Query process if that information is available in the folder query. This can help investigate a bad record or compare monthly exports. It is also useful to keep a separate archive of original files, because a combined table alone may not preserve the exact source documents or their original layout.
Common problems and practical fixes
- Only one file appears: Confirm that the other files are in the selected folder, have the expected file extension, and are not excluded by a filter. Then refresh the preview or query.
- Columns are misaligned: Check whether every CSV uses the same delimiter and quoting conventions. Revisit the sample-file settings and inspect the raw file in a text editor if necessary.
- Extra header rows show up as records: Remove repeated headers or filter out rows whose values match the column names. If files have different introductory lines, adjust the transformation carefully and verify it against multiple files.
- Numbers or dates look wrong: Set the column type explicitly in Power Query and check the source locale. Change identifiers that need leading zeros to Text.
- Refresh reports that a file cannot be found: Check whether the source folder was moved, renamed, disconnected, or made unavailable. Restore the location or update the query’s source.
- Duplicate records appear: Determine whether they already exist in the source files. Power Query appending does not automatically identify that two rows represent the same real-world record; remove duplicates only when you have a reliable key and a clear rule.
Power Query features and connector availability can differ by platform and update. These detailed folder steps are for Excel for Microsoft 365 on Windows. Excel for Mac has Power Query capabilities, but available connectors and interface options can vary by version; if From Folder is not available in your build, import the CSV files individually with the available Text/CSV option or use a supported Windows installation to create the folder query. Excel for the web has a more limited set of query creation and data-source features than desktop Excel, so use the desktop app for this folder workflow when the web interface does not offer the required connector.
When to choose another approach
For a small, one-time task, opening each file and copying rows into one workbook may seem quick. It can be acceptable when there are only a few files and you verify the headers, but it is easy to paste a header in the middle of the data, omit rows, or mix up columns. Power Query is more repeatable when the task will recur or the file count is large.
If the files are already separate Excel workbooks, a folder query may still be useful, but the transformation needs to account for workbook sheets or tables rather than CSV structure. If the data changes continuously in a database or online service, a direct connection may be more suitable than repeatedly exporting CSVs. For a one-off analysis in which files have different layouts, importing each separately and cleaning them individually may be safer than forcing them into one combined table.
Choose based on the outcome you need: one long table for similar records, separate sheets for distinct files, or a merge when fields must be matched by a key. This distinction prevents a common misconception that selecting several files automatically creates a polished workbook with one worksheet per file. The folder combine action is designed primarily to consolidate compatible records.
Frequently Asked Questions
Can Excel combine multiple CSV files into one sheet?
Yes. Use Data > Get Data > From File > From Folder, then choose Combine & Transform Data. Power Query appends compatible files into one query result, which you can load to a worksheet as a table.
Does Excel automatically include new CSV files?
Not immediately. After placing a compatible file in the connected folder, refresh the query with Data > Refresh All or the query’s refresh command. The query then reads the current files in its source location.
Can I import each CSV onto a separate worksheet?
Yes. Import each file separately through Data > From Text/CSV and load each result to the workbook. The folder combine workflow is intended to append files, not automatically create a separate worksheet for every file.
Why did Excel remove leading zeros from my CSV?
Excel or the query may have interpreted a digit-only field as a number. Set that column’s data type to Text in Power Query before loading, particularly for postal codes, IDs, and product codes.
Can I combine CSV files with different columns?
Power Query can combine files with differing columns, but the output may contain blanks where a file has no matching field, and inconsistent headers can create unintended columns. Standardize the headers where possible and inspect the combined result before relying on it.
Related
- Excel Circular Reference When There Are None?
- Excel Change Page Breaks: Adjust Print Layout
- Excel PivotCharts: How to Create and Use Them
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Can You Schedule an Email in Outlook? How to Do ItYes. Outlook can schedule an email to be sent later: in newer Outlook versions, open the menu beside…
- Google Sheets SUMIF: Syntax, Examples, and Common FixesTo add values in Google Sheets only when matching cells meet a condition, use SUMIF. For example, if…
- AG Grid Merge Cells: Row and Column Spanning ExplainedYes—AG Grid can make a cell span adjacent rows or columns, but it does not provide a general-purpose…
- Alternating Color Rows in Excel: 2 Easy MethodsTo add alternating color rows in Excel, select your data and choose Insert > Table, then pick a…
- Add Page Numbers in Microsoft Word: A Practical GuideTo add page numbers in Microsoft Word for Microsoft 365 on Windows, select Insert > Page Number, choose…
- Clear Email Address Cache in Outlook: Step-by-StepTo clear Outlook’s remembered email addresses, remove individual suggestions with the X beside them, or, in classic Outlook…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.