How to merge Excel files
- Add your files. Choose two or more Excel, ODS or CSV files.
- Put them in order. Use the arrows to move a file up or down.
- Choose a layout. Keep separate sheets, or stack everything into one.
- Press Merge files, then download your workbook.
Which layout should I choose?
| Layout | What you get | Best for |
|---|---|---|
| Separate sheets | One tab for each sheet in each file | Keeping files apart in one workbook |
| Stack into one | All rows on one sheet | Monthly reports with the same columns |
When stacking, a file’s first row is dropped if it’s the same as the first file’s headings, so they don’t repeat. Columns are matched by position, not by name, so make sure your files use the same order.
What’s kept?
- Separate sheets: values and formulas are kept when the file holds them.
- Stack into one: values are kept, and formulas become their results.
- Not kept: colors, charts and pictures may be lost, so check your result.
A formula that refers to another sheet may need fixing if that sheet’s name changed.
Limits
You can add up to 30 files, up to 200 MB in total. Password-protected files can’t be opened, so remove the password in Excel first.
To change a file’s format, use our Excel converter. To make a PDF, use Excel to PDF.
Is it private?
Yes. Everything runs inside your browser, and your spreadsheets are never sent to our servers.
Example: merge Excel files into separate sheets
Say you add two files: Q1 Sales.xlsx, which has a North sheet and a South sheet, and March.csv. With Separate sheets chosen, merged.xlsx gets three tabs:
- Q1 Sales North and Q1 Sales South. The file has more than one sheet, so each tab name joins the file name and the sheet name.
- March. A CSV has only one table, so the tab takes the file name alone.
The tabs follow the order of your file list, so move a file up or down before you merge if the order matters. Sheets with no data are left out.
How sheet names are made valid
Excel has rules for sheet names. A name can’t be blank, can’t be longer than 31 characters, and can’t contain any of these characters: / \ ? * : [ ].[1] It also can’t begin or end with an apostrophe.[1] This tool follows those rules for you:
- Characters that aren’t allowed are replaced with a hyphen, so a sheet called Sales/Costs in a several-sheet workbook named Budget.xlsx becomes a tab called Budget Sales-Costs.
- Long names are cut to 31 characters.
- When two names match, the second gets a number, such as Sales (2).
- A name with nothing left in it becomes Sheet.
Excel also reserves the name History for its own use.[1] If one of your files is called History, rename it before you merge.
Example: stacking monthly reports into one sheet
Choose Stack into one when every file has the same columns. Say January’s file starts with the headings Date, Item and Amount, then one row of data, and February’s file starts with the same headings. The merged sheet keeps the heading row once, followed by January’s row and February’s row.
A later file’s first row is dropped only when it matches the first file’s headings exactly. An empty cell at the end of the row doesn’t count as a difference. If March’s file says Product instead of Item, its heading row is kept and lands in the middle of your data, so make the headings match before you merge. Blank rows are skipped when stacking.
Before you merge
- Remove total rows. A total at the bottom of each file ends up in the middle of a stacked sheet.
- Keep columns in the same order. Stacking matches columns by position, not by name.
- Watch the size of one sheet. An Excel worksheet holds at most 1,048,576 rows by 16,384 columns.[2] If your stacked files go past that, use Separate sheets instead.
- Check the file order. Stacked rows follow the order of your file list, so put January before February if you want the rows in date order.
- Use the same date style. CSV files keep dates as they were typed, so mixed styles stay mixed after the merge.
How this tool works
Your workbooks are combined in your browser with SheetJS. Nothing is uploaded. You can add up to 30 files, with a combined size of up to 200 MB. XLSX, XLSM, XLSB, XLS, ODS, CSV, TSV and TXT files are accepted. You choose the order. The result is one file named merged.xlsx.
- Separate sheets: each sheet that has data is copied into the new workbook as its own sheet. The name comes from the file name, plus the sheet name when the file has several. Names are limited to 31 characters, and repeats get a number such as Sales (2).
- Stack rows: all tables go one under another on a single sheet called Merged. If a later table starts with the same heading row as the first, that row is left out.
Password-protected files cannot be read, and the tool names the file that failed.
What next
Use this often? Add Excel Merge to your Home screen.
Frequently asked questions
How do I merge Excel files into one?
Add your files here, choose separate sheets or one stacked sheet, then press Merge files.
Can I merge CSV files?
Yes. You can mix CSV, XLSX, XLS and ODS files, and you’ll get one XLSX workbook.
Will my formatting be kept?
Not fully. Values are kept, but colors, charts and pictures may be lost, so check your result.
Are my files uploaded?
No. Everything runs in your browser, so your spreadsheets stay on your device.
Why is my sheet name cut short?
Excel sheet names can’t be longer than 31 characters, so longer names are cut. Characters Excel doesn’t allow, such as a slash or a question mark, are replaced with a hyphen.
Is a repeated heading row always removed when stacking?
Only when it matches the first file’s heading row exactly. If a later file uses a different heading, its first row is kept, so make the headings the same before you merge.
Was this tool helpful?
What went wrong?
We only receive the reason you pick, never what you typed into the tool.
Thanks for your feedback.