Skip to main content
SheetTidy

Merge Excel and CSV files into one sheet

Stack monthly exports, branch reports or survey files into a single table, with columns matched by name and a column showing where each row came from.

  1. 1
  2. 2
  3. 3
  4. 4

Drop your Excel or CSV files here

Add two or more files, or one workbook with several sheets.

XLSX, XLSM, XLS, ODS, CSV, TSV or JSON

Your file never leaves your device

How to use this tool

  1. Step 1: Add your files

    Drop several files at once, or add them one at a time with the Add files button. Excel, CSV, TSV, ODS and JSON files can be mixed in one merge.

  2. Step 2: Pick sheets if needed

    If a workbook has several sheets, tick each sheet you want to include. Every ticked sheet counts as one file. Remove anything you added by mistake from the list.

  3. Step 3: Choose how columns line up

    Keep "By header name" so Email always goes under Email, or choose "By position" when your files have no reliable headers. Leave the Source file column on to see where each row came from.

  4. Step 4: Download the merged file

    Read the summary, check the preview, then save. The file is named after the first file you added, for example sales-april-merged.csv.

How to merge Excel files manually

Excel can combine files, but none of the built-in routes is quick for a one-off job, and each has a trap that catches people out.

Copy and paste

For two or three small files, opening each one and pasting its rows under the last is the obvious approach. It works only if every file has its columns in exactly the same order. If April’s export lists Order, Customer, Amount, City and May’s lists Customer, Order, City, Amount, pasting stacks customer names under order numbers, and nothing warns you. It is also easy to paste a second header row into the middle of the data or miss the last few rows of a long sheet.

Power Query: combine files from a folder

  1. Put all the files in one folder, with nothing else in it.
  2. In a blank workbook, go to Data › Get Data › From File › From Folder and pick the folder.
  3. In the window that lists the files, click Combine › Combine & Transform Data.
  4. Choose a sample file and the sheet or table to use, then click OK.
  5. Check the result in the Power Query Editor and click Close & Load.

This is powerful and can be refreshed when new files arrive, but it assumes the files share the same structure, because the steps are built from the sample file. It matches columns by header name case-sensitively, so “Email” in one file and “email” in another become two separate columns, each half empty. A header with a trailing space does the same. Many people only notice when the merged table is twice as wide as expected.

Append a few tables

If the data is already loaded as queries, Data › Get Data › Combine Queries › Append stacks two tables, or three or more if you choose that option. The same case-sensitive matching applies, and every file must be loaded as its own query first.

VBA

A macro can loop through a folder and copy each sheet into a master sheet. It is fine for a repeated task but needs a macro-enabled workbook, and most simple scripts copy by position, so they break the moment a column moves.

When this tool helps

Monthly or branch exports. Your billing system gives you one CSV per month, or each branch sends its own sales file. Someone added a column in May, or the export changed its column order after an update. Matching by header name lines everything up anyway, and the Source file column tells you which month or branch each row belongs to.

Survey responses from several forms. You ran the same survey through two forms, and one labels the question “email” while the other says “Email Address “. Columns whose names differ only in capitals or spacing are matched; ones with genuinely different names are kept side by side and listed in the summary, so you can see what needs renaming.

Team copies of one template. Five people each filled in their own copy of a tracker. Merging the copies gives you the full list in seconds, and the source column shows who entered each row.

Sheets inside one workbook. A workbook with a tab per quarter or per region can be flattened into one table by ticking each sheet, which makes it ready for a PivotTable or a filter.

What the tool does differently

  • Columns are matched by name, not position. A column can be third in one file and fifth in another. Capitals and extra spaces in headers are ignored, which avoids the most common Power Query surprise.
  • Nothing is dropped silently. A column found in only some files is kept and named in the summary, with a count of the files it appeared in. For the sample files the summary reads: “Merged 2 files into 5 rows and 5 columns, matching columns by name. This column is only in some files and left empty for the others: Salesperson (in 1 file).”
  • Repeated headers stay apart. If one file has two Amount columns, they remain two columns rather than being squashed into one.
  • Formats can be mixed. An .xls from an old system, a CSV from a web app and an .ods from LibreOffice can go into the same merge.
  • Headings keep their original spelling. Each column takes its heading from the first file that contains it, so your preferred wording comes from the file you add first.

Tips for a clean merge

Add the file with the best headings first, since it sets the output format and the column names. If your files have no header row, or the headers are unreliable, switch to “By position”: column A goes under column A, and the headings come from the first file. Check the column count in the summary; if it is higher than you expected, two files probably use different words for the same thing, and you can rename one heading and merge again.

Merged exports often overlap, for example when two date ranges share a few days or a customer appears in two branch files. Run Remove duplicates on the result afterwards, comparing on an ID or email column, to finish with one clean list.

Frequently asked questions

How many files can I merge at once?

Between 2 and 50 files or sheets in one go. If you have more, merge them in batches and then merge the results.

What if my files have their columns in a different order?

With "By header name", which is the default, each value goes under the column with the same heading, wherever that column sits in each file. "Customer" and "CUSTOMER " count as the same heading, because capitals and extra spaces are ignored.

What happens to a column that only some files have?

It is kept. Rows from the files without it are left empty in that column, and the summary lists the column and how many files it appeared in, so nothing is dropped silently.

Can I merge sheets from the same workbook?

Yes. Add the workbook, tick the sheets you want, and each one is treated as a separate file. The Source file column then shows names like "budget.xlsx › Q2" so you can tell the sheets apart.

Which format is the merged file saved in?

It follows the first file in the list. If that is a CSV file you get a CSV back; for any other format you get an .xlsx workbook.

Is cell formatting kept?

No. The merge carries over the values only, so colours, fonts, borders and formulas are not copied. The values themselves, including leading zeros and dates, come through as they were.

Are my files uploaded anywhere?

No. Reading, matching and writing all happen inside your browser tab, so customer lists and sales figures stay on your computer.