Excel can pull several files into one workbook in minutes, but the method depends on what the files look like. If your files are CSV or plain-text, use Data > Get Data > From File > From Folder, which lists every file in a folder and appends them into one table. If they are already Excel workbooks with identical layouts, the same folder route works once you filter the list to .xlsx files. If each file has a different layout or you only need a handful of them, importing them one at a time into separate sheets with Power Query is faster and less error-prone. This guide covers the folder method first, then the sheet-by-sheet alternative, and finishes with the mistakes that most often break the import.
What You'll Need
- Excel for Microsoft 365, Excel 2021, or Excel 2019 on Windows. On Mac, the folder import is available in Excel for Microsoft 365; older Mac versions only support the single-file route.
- All source files in one folder, with nothing else in it that Excel might pick up (no shortcuts, no temporary files, no notes).
- Data starting in the same row and the same columns in every file, ideally with a header row. This is what makes appending reliable.
- A new, blank workbook to hold the combined result, so a failed query cannot damage an existing file.
- Files saved as .csv, .txt, .xlsx or .xlsm. Legacy .xls files are best converted to .xlsx first.
Step-by-Step
- Put every file in a dedicated folder. Create a folder such as Monthly Sales and move only the files you want to combine into it. If the folder contains other spreadsheets, the import will pull them in too. Nested subfolders are read as well, so keep the structure flat unless you want that.
- Check the column headers match. Open two or three files and confirm the header row and column order are the same. If one file calls a column Date and another Sale Date, the combined table will get two separate columns with gaps. Rename headers so they match exactly before importing. Also check that the files use the same date and number formats, or convert them to a consistent format first.
- Open a new blank workbook. Click Blank workbook on the start screen, or use File > New. Keep the folder with your source files closed in File Explorer or Finder if you have it open, purely to avoid accidentally editing a source file mid-import.
- Start the folder query. Go to Data on the ribbon, then Get Data > From File > From Folder. On Mac the Data tab has Get Data (Power Query) instead, with a similar set of options. Menu labels can differ slightly between Excel versions, platforms and regions.
- Point Excel at the folder. Browse to the folder, select it, and click Open. Excel scans the folder and shows a preview window listing every file with columns for name, extension, date modified and size. If a file you expect is missing, check it is not open in another program and that it is saved inside the folder itself.
- Filter the list to the file types you want. Use the filter arrow on the Extension column and tick only the relevant extensions, for example .csv or .xlsx. This is the step that keeps stray files out. If your files are mixed types, do this import once per type.
- Choose the loading approach. Click Combine > Combine and Load to push the result straight into a table on a new sheet. Choose Combine and Transform Data instead if you want to clean columns, remove a column or change data types before loading. Combine and Transform Data opens the Power Query Editor, which is usually the better choice for real work.
- Confirm the sample file. Excel picks one file as a template and shows a preview. If the preview shows the correct columns, click OK. If it shows the file's folder path or a single unnamed column, the sample file is the wrong shape; pick a different file from the dropdown and confirm. This dialog also offers a checkbox for using the first row as headers, which matters for CSV files without one.
- Check the Sample File step in the editor. In the Power Query Editor, select the Sample File query and look at the applied steps on the right. If the Promoted Headers step used a column name from a single file that differs from the others, you can rename it there so every file maps to the same column.
- Fix column types. Click the icon at the top-left of each column header to set a type, such as Date, Whole Number or Text, or use Transform > Data Type. Watch for a column of dates showing as text: that is the usual cause of sorting and filtering failures later.
- Remove helper columns. The combined query adds a Source.Name column showing which file each row came from. Keep it if you want to trace rows; remove it (right-click the header > Remove) if you do not. You can also delete the row-number column the query adds for CSV sources.
- Load the result. Click Close & Load to put the table on a new sheet. The rows from every file are appended under one header row, and the row count in the status bar should equal the total across all source files.
- Save and make it reusable. Save the workbook, then drop new files into the same folder and click Data > Refresh All. The query re-reads the folder and appends the new files. For .csv and .txt sources this is reliable; for .xlsx files, refresh picks up new files and new rows, so re-check for duplicates if a file is edited rather than replaced.
- For a handful of differently shaped files, import one at a time. Use Data > Get Data > From File > From Workbook, choose a file, then in the Navigator pane tick the sheet or table and click Load to a new or existing sheet. Repeat for each file. This gives you one sheet per file and suits files with different structures, where appending would create misaligned columns.
Common Mistakes
Importing from a folder with clutter. Any supported file in the folder, including old versions and backups, gets combined. Copy the current files into a clean folder first.
Mismatched headers. A single differently spelled column creates a second block of empty cells in the combined table. Fix the source files, or accept the extra column and merge the two afterwards in the editor by renaming one to match the other.
Leading zeros and IDs turning into numbers. Product codes and phone numbers lose their leading zeros when Excel reads them as numeric. Set the column type to Text in the editor before loading.
Dates in different formats. Files exported from different systems may mix day-first and month-first dates. Standardise them before importing, or some rows will land as text that will not sort.
Editing the combined table by hand. Typing into a loaded query table and then refreshing wipes your edits. Keep manual changes in a separate sheet that references the loaded table.
Importing from a network drive that is sometimes offline. The query stores the file path; if the drive is unavailable, refresh fails. Keep the source folder on a local drive or a synced folder that is always mounted.
Tips
- Name files with a consistent pattern and, if you want them in a set order, add a sortable prefix like 01_, 02_. Power Query reads files in name order by default.
- Use Combine and Transform Data rather than Combine and Load on your first attempt, so you can inspect each column before it reaches a sheet.
- Once the query works, add a column from the Source.Name field as a label rather than deleting it; it makes it easy to trace a wrong number back to its file.
- Run the import on a folder of three test files first when the structure is new, and only then point it at the full set.
- Keep one header-only template file in a separate folder if some exports lack a header row.
Troubleshooting
The preview is empty or shows one column named Column1. The sample file has no header row or a different delimiter. In the editor, use Home > Use First Row as Headers, and for CSV files check the delimiter setting under the Source step.
Rows are missing after loading. Check that every file uses the same extension you filtered for, and that the source folder does not contain a subfolder with unsaved files. Compare the row count with the total from the individual files.
Columns do not line up. Column order differs between files, so the first file's order wins and later files' values land in the wrong columns. Rename or reorder the source columns so they match exactly, then refresh.
Refresh fails with a path or permissions error. A source file has moved, been renamed, or is locked by another program. Close the file, restore the path, then click Data > Refresh All. If it still fails, use Data > Queries & Connections, open the query, and check the step showing the error.
Excel is slow or the file bloats. Large folders of CSV files can create long refresh times. Load only the columns you need, remove the helper columns, and consider loading to the Data Model rather than a sheet.
Still stuck after checking files, headers and paths. Delete the query (this does not touch the source files), then rebuild it from scratch in a new workbook. Rebuilding is faster than hunting a broken step, and the source data is safe because the query only reads the folder.
Frequently Asked Questions
Can I import all files from a folder into one sheet?
Yes. The From Folder import appends the rows from every file into a single table on one sheet, which is exactly what a combined dataset needs.
Does this work with files saved as .xls?
Older .xls files are not reliably combined by the folder query. Open each one and save it as .xlsx first, then import the folder again.
Will new files in the folder appear automatically?
Not automatically. Click Data > Refresh All after adding files, and the new ones are appended.
Can I import files with different columns?
You can, but the combined table will contain every column with blanks where a file lacks one. If the layouts are genuinely different, import each file separately with From Workbook instead.
Why do my numbers lose their leading zeros?
Excel infers those columns as numeric. Set the column type to Text in the Power Query Editor before loading and the zeros are kept.
Does the folder import work on Excel for Mac?
The folder option is available in newer Excel for Microsoft 365 builds on Mac through the Data tab's Get Data menu. Older Mac versions do not include it, so import the files one at a time.