Yes. In Excel for Microsoft 365 on Windows, you can import multiple CSV files and either combine their rows into one table or bring each file in separately. For a repeatable combined import, use Data > Get Data > From File > From Folder; for one-off work or files with different layouts, import them individually.
What importing multiple CSV files can mean
There are two common goals behind this question. You may want to stack records from several files into one dataset—for example, combine monthly sales exports into a single table. Or you may want to open several files in the same workbook while keeping each file’s data separate. Excel can do both, but the best route depends on what you need to do with the results.
CSV stands for comma-separated values. A CSV file is plain text arranged in rows and fields; it does not preserve Excel formatting, formulas, worksheet tabs, or column widths. When Excel imports a CSV, it interprets that text and places the result into a worksheet or a query. That interpretation matters: dates, numbers, delimiters, and leading zeros can be handled differently depending on the import settings.
For repeat work, Power Query is usually the most useful option. It can read files from a folder, combine their contents, and retain steps such as removing unwanted columns or setting data types. You can then refresh the query when new files arrive. Importing each CSV separately is simpler when there are only a few files or when the files should remain independent.
Combine matching CSV files with Power Query
The From Folder connector is designed for a set of files that share a broadly consistent structure. A typical example is a folder containing one CSV per month, with the same column headings and the same kind of data in each file. Power Query reads the files, applies a transformation based on a sample file, and appends the records into a combined result.
Keep the input folder focused on the files you intend to include. If it also contains unrelated CSVs, old exports, or other file types, those may appear in the folder query’s file list. You can filter the list by extension, name, or folder path before combining. Avoid placing the finished output workbook in the input folder if it could be mistaken for an input file or lead to confusing refresh results.
This method is more than a one-time merge. The query records its source and transformation steps in the workbook. If another matching CSV is added to the folder later, refreshing the query can bring in its rows without repeating the whole import process.
Steps to combine files from a folder
- Place the CSV files you want to combine in one folder. Check that they use the same headings and that corresponding columns mean the same thing.
- In Excel, choose Data > Get Data > From File > From Folder, then browse to and select the folder. The folder connector lists the files it finds.
- Review the list before combining. Filter out files you do not want, such as an unrelated export, a backup, or a CSV with a different layout.
- Select Combine & Transform Data to inspect and shape the files in Power Query. Excel may ask you to choose a sample file or provide a preview of the combination.
- Check the column names, delimiter, data types, and sample rows. Remove columns you do not need, filter unwanted rows, and correct any type assignments before loading.
- Choose Home > Close & Load, or use Close & Load To if you need to choose where the results go. The combined data can be loaded to a worksheet table; in supported configurations, query output can also be loaded to the Data Model.
Power Query’s exact preview and dialog wording can vary with the workbook and Excel build, but the key choice is to combine and transform the folder contents rather than simply load a list of file names. When the query is ready, Excel creates a combined result from the files that pass your filters.
How the combined result works
For matching files, combining generally means appending rows: the records from one CSV follow the records from another under a common set of columns. It is not the same as joining two tables side by side using a shared customer ID or order number. A join, also called a merge in Power Query, matches rows based on selected columns and is a different operation.
Power Query uses a sample file to determine how to interpret and transform the other files. As a result, consistent structure is important. If one file calls a field Customer ID and another calls it Client ID, or one file contains an extra introductory row, the combined output may not match your expectations. Review the generated query steps and the resulting rows rather than assuming every source file was interpreted identically.
The file order in the folder list should not be treated as a reliable business sort order. If row order matters, include a date, sequence, or source-file column and sort the final data explicitly. Keeping a source file name in the output can also help trace a record back to the CSV it came from, especially when checking unusual values.
Choose between combining and importing separately
Use a folder query when the files are comparable and you want one growing dataset. Import files separately when they have different columns, need different cleaning, or must remain distinct. For example, combining five regional transaction exports with identical headings is a natural append. Combining a customer list, a product list, and a transactions file as though they were one table would usually be the wrong operation because each contains a different type of record.
- Choose From Folder for recurring batches with a common layout, such as weekly logs or monthly sales exports.
- Choose individual imports for a small number of unrelated CSVs or when each one should have its own worksheet or query.
- Use a Power Query merge when you need to match records across datasets using a key, such as adding product descriptions to transaction rows.
- Consider a database or other data tool if the files are too large for a worksheet, the data needs controlled multi-user handling, or the workflow requires more than Excel is designed to manage.
There is no requirement to put every CSV into one sheet. Separate worksheets can make a workbook easier to inspect, while one combined table is often better for filtering, PivotTables, and analysis across all periods.
Import files individually into one workbook
For a few files that should remain separate, import each one through Data > Get Data > From File > From Text/CSV. Select a file, inspect the preview and import settings, then choose Load or Transform Data. Repeat for each CSV. When you use Load, Excel normally creates a worksheet table for that import; check the destination options if you need a particular sheet or cell location.
You can also open a CSV directly in Excel, but importing through the Data tab gives you a chance to inspect how Excel is reading the file before loading it. If you open a CSV directly and then save it as a workbook, save the result as an Excel workbook format such as .xlsx if you need to retain multiple worksheets, formatting, or query connections. A CSV itself holds only one plain-text table, not an entire multi-sheet workbook.
On Mac, the available Power Query connectors and interface can differ by Excel version and update channel. If From Folder is not available in your installation, importing the CSVs individually or using a Windows copy of Excel for the folder-combine workflow may be practical alternatives. Excel for the web also has different data-import capabilities from the Windows desktop application; do not assume every desktop Power Query command is available in the browser.
Prepare CSV files to avoid import errors
A little preparation can prevent incorrect totals or hard-to-find inconsistencies. Compare the headers and a few representative rows in each file before combining. Confirm that columns are in a consistent order where possible, that the same kind of value appears in each corresponding column, and that there are no extra title rows or subtotals mixed into the data.
- Check separators. CSV commonly uses commas, but some regional settings or exports use semicolons or tabs. Use the import preview to select the correct delimiter if Excel has split fields incorrectly.
- Preserve identifiers. Codes such as 00127 are identifiers, not quantities. Set such columns to text during transformation so leading zeros are not removed.
- Review dates and decimals. A date such as 04/05/2026 can be interpreted differently across regional settings. Check the preview and, where needed, use the appropriate locale when assigning a date or number type in Power Query.
- Inspect text encoding. If names or symbols display incorrectly, check the file origin or encoding options in the import process. The correct choice depends on how the CSV was saved.
- Look for repeated headers. Some exports add a header row within the data. Remove those rows if they appear as records in the combined output.
Excel worksheets have a limit of 1,048,576 rows and 16,384 columns. A combined result larger than a worksheet can hold will not fit as a normal sheet table. For large datasets, consider loading to the Data Model where appropriate or using a database or analytics tool intended for that scale. Also check whether long numeric-looking identifiers should be text: Excel only retains 15 digits of numeric precision, so long IDs should not be treated as ordinary numbers.
Common problems and practical fixes
Columns appear in the wrong places: the delimiter may be wrong, or a field containing a comma may not be quoted correctly in the source file. Revisit the preview and inspect the CSV structure. If the source file is malformed, correcting the export is usually more reliable than trying to patch every affected row after import.
Some values become dates or numbers unexpectedly: Excel or Power Query may have assigned a data type based on the sample file. Review the type-change step in Power Query and set the intended type explicitly. This is particularly important for product codes, postal codes, and values with leading zeros.
One file is missing or causes errors: check the folder filters, file extension, permissions, and whether that CSV has different headers or an extra row. A file with a changed layout can fail a transformation designed around the sample file. Inspect the query’s error details and either standardize the file or adjust the transformation to handle the variation.
The result contains duplicates: a folder query appends the contents it finds; it does not automatically know whether two rows represent the same real-world record. Check whether duplicate files are in the folder and whether repeated records are present in the source exports. Remove duplicates only when you have a defensible key or rule for deciding which records are duplicates.
Refresh and maintain the import
After loading a Power Query result, use Data > Refresh All to update workbook connections and queries. If the query points to a folder, put new matching CSVs in that source folder and refresh. The query can repeat its saved transformation steps, so you generally do not need to rebuild it for every new batch.
Refresh is not a substitute for checking source changes. If a supplier changes a column name, date format, or export layout, the old steps may produce errors or unexpected results. Keep a brief note of the source folder and expected file structure, and review the refreshed output when the export process changes. If a workbook is shared, make sure the person refreshing it can access the same folder path; a connection to a local folder may not work for colleagues whose computers do not have that path.
Frequently Asked Questions
Can Excel combine CSV files automatically?
Yes. Use Data > Get Data > From File > From Folder, filter the file list if needed, and combine the matching files in Power Query. Later, add new files to the folder and refresh the query.
Can I import multiple CSV files into one Excel sheet?
Yes. Combine files with Power Query when their rows share the same column structure. Excel appends the records into one result; it does not automatically match unrelated columns or deduplicate records.
Can I put each CSV file on a separate worksheet?
Yes. Import each file separately and load each result to its own worksheet or chosen destination. For a small batch, this is often easier to manage than combining files that have different layouts.
Will Excel keep leading zeros when importing a CSV?
Not always if a column is interpreted as a number. Set identifier columns to text during import or in Power Query, then check the result. Formatting a cell as text after zeros have already been removed may not restore the original values.
Does Excel combine files with different columns?
It can process files with variations, but the result may contain blank values, mismatched fields, or errors unless the query is designed for those differences. Standardizing the headers and layout first is usually the clearest approach.
Can I refresh a combined CSV import when files change?
Yes. For a folder-based query, refresh the workbook after adding or replacing source files. If the file structure or location changes, update the query or its source settings and verify the refreshed result.
Related
- Conditional Formatting: Compare Two Columns in Excel
- AG Grid Hide Column Menu: How to Use and Customize It
- Conditional Formatting: Apply Rules to Entire Rows
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Conditional Formatting: How to Apply RulesYes. Google Sheets includes conditional formatting, which automatically changes a cell’s appearance when its value or a formula…
- SUMIF Negative Numbers in Google Sheets: TipsTo add only negative numbers in Google Sheets, use =SUMIF(B2:B7,"<0") when the values are in B2:B7; it returns…
- How to Clear Cache Files in Outlook SafelyTo clear Outlook’s local cache on Windows, close classic Outlook, rename the account’s .ost file, then reopen Outlook…
- How to Freeze Different Rows in Excel Without GuessworkTo keep one or more rows visible while you scroll in Excel, select a cell in column A…
- Change Outlook Tasks Date Format in Grid ViewIn classic Outlook for Microsoft 365 on Windows, change a task grid’s date display through View > View…
- Create an Outlook Signature in Word and Add It to EmailCreate your signature in Microsoft Word, copy the finished layout, then paste it into Outlook’s signature settings and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.