Merge Excel Files
Operator: Abdulla Al Fahad. How tools are built and checked
Merge Excel Files takes up to 30 .xlsx, .xls or .csv files and writes them into one workbook called merged-workbook.xlsx. You choose one of two layouts: each file on its own tab, or every file's rows stacked under one set of headers on a single sheet.
Stacked mode matches headers by name after trimming spaces and ignoring case, so " revenue" in one file and "Revenue" in another land in the same column, and it reports for each file which of the first file's headers are missing and which are extra. In Excel the same job usually means Power Query or manual copying.
Key features
- Two layouts: one tab per file, or all rows stacked on one sheet
- Option to bring in every sheet of each workbook, with tabs named "file - sheet"
- Header matching by name, ignoring case and surrounding spaces
- Per-file report of missing and extra headers when stacking
- Optional "Source file" column that labels each stacked row
- Reorder files before merging; the first file sets the stacked headers
- Number formats kept; formulas converted to their saved values
- Runs in the browser; no upload, no account
Input can be any mix of .xlsx (Excel 2007 and later), .xls (the older Excel 97-2003 binary format) and .csv. CSV files are decoded as UTF-8. In CSV input, plain numbers such as 120.5 or -42 become numeric cells. The leading-zero rule works per column and per file: if any cell in a CSV column starts with a zero followed by another digit, such as the ZIP code 02134 or the ID 000981, the whole column in that file stays text, so the zeros survive and a 90210 in the same column also stays text.
The output is always a single .xlsx file. Cell values come across exactly as the source workbook stored them, and each cell keeps its number format, so a date stays a date, 0.15 shown as 15% still shows as 15%, and a currency format is kept. A formula arrives as the last value Excel calculated and saved for it; the formula text itself is dropped.
What is copied, in both modes: cell values (text, numbers, TRUE/FALSE and error codes) and the number format of numeric cells. In one-sheet-per-file mode, each cell also stays at its original address, and merged cell ranges and column widths are copied when the source file records them; in stacked mode they are not, because rows from different files no longer line up with the original layout. Everything else is not carried over: fonts, fills, borders and other cell styling, row heights, frozen panes, charts, images, pivot tables, conditional formatting, data validation drop-downs, comments, hyperlinks and macros.
How it works
When you press Merge, the page reads each file into memory with the browser's File API and parses it with the SheetJS library. Only cells that hold a value are collected, so a sheet whose used range was stretched to row 1,048,576 by stray formatting does not turn into a million empty rows.
In one-sheet-per-file mode, each source sheet is copied to a new tab at the same cell positions, so a title in A1 and a table starting at B4 stay where they were. The tab name is the file name without its extension, cleaned up to meet Excel's rules: the characters : \ / ? * [ ] are removed, the name is cut to 31 characters, and if two names collide the second gets " (2)", the third " (3)" and so on.
In stacked mode, the first non-empty row of each file is treated as its header row. The first file in your list defines the starting column order. For every later file, each header is trimmed and lower-cased and then matched to an existing column. Headers that do not match anything are added as new columns on the right, and rows from files that lack a column get a blank cell there. Completely blank rows are skipped.
Common use cases
- A finance analyst receives twelve monthly expense workbooks and wants them as twelve tabs in one file for the year-end review, so each month can still be read on its own.
- A school office collects the same attendance template from eight teachers and stacks the rows into one sheet, with the Source file column showing which class each row came from.
- An operations lead has a CSV export from the warehouse system and an .xlsx from the courier, and wants both in one workbook to send to a supplier as a single attachment.
- A researcher merges survey waves where the later questionnaire added two questions, and uses the missing and extra headers report to confirm only those two columns are new.
How to use this tool
- Click Add files or drop your .xlsx, .xls and .csv files onto the upload area.
- Check the order. Use the arrow buttons to move the file whose headers you want to keep to the top.
- Pick One sheet per file or Stack rows into one sheet.
- Set the option for that mode: every sheet of each workbook, or a Source file column.
- Press Merge files and read the sheet list and, for stacking, the header check.
- Press Download merged-workbook.xlsx and open it in Excel, LibreOffice or Google Sheets.
Example
Three monthly exports from a regional sales team
sales-jan.xlsx (sheet "Sales")
Region | Units | Revenue
North | 140 | 9,800.00
South | 95 | 6,650.00
sales-feb.xlsx (sheet "Feb export")
revenue | REGION | Units | Returns
7,210.00 | North | 103 | 4
sales-mar.csv
Region,Units
West,61Stack rows into one sheet, with the Source file column
Sheet "Merged"
Source file | Region | Units | Revenue | Returns
sales-jan.xlsx | North | 140 | 9,800.00 |
sales-jan.xlsx | South | 95 | 6,650.00 |
sales-feb.xlsx | North | 103 | 7,210.00 | 4
sales-mar.csv | West | 61 | |
Header check: sales-feb.xlsx missing none, extra Returns;
sales-mar.csv missing Revenue, extra none.Tips for best results
- Put the most complete file first when stacking. Its headers decide the left-to-right column order, and every other file is lined up against it.
- If several workbooks have the same file name in different folders, rename them before adding them. Otherwise the tabs come out as "report", "report (2)", "report (3)" and you lose track of which is which.
- Keep file names short when using every sheet of each workbook. "Q3-regional-sales-summary-final - Pivot" is longer than 31 characters, so the sheet part is cut off and only the numeric suffix tells the tabs apart.
- Recalculate and save a workbook in Excel before merging it if it was produced by another program. Formula cells are copied as their last saved values, and a file that was never calculated may have no value stored.
Common pitfalls
Header matching is by name only. "Revenue" and "revenue " match, but "Revenue" and "Revenue (USD)" or "Rev" do not; they become two separate columns. Rename headers in the source files first if they mean the same thing.
Stacking assumes the header is the first non-empty row. A report with a title such as "Sales by region - January" in row 1 and the real headers in row 3 will have its title treated as the header row. Delete the title rows before stacking, or use one-sheet-per-file mode, which keeps the layout as it is.
Stacking reads only the first sheet of each workbook. If the data you need is on the second tab, move it to the front in Excel or merge with one sheet per file and every sheet included.
Hidden sheets are treated like any other sheet when every sheet is included, and they are visible in the merged file.
Common errors and how to fix them
- "Could not read "budget-2026.xlsx". It may be damaged, password-protected or not really a spreadsheet."
- Password-protected workbooks cannot be opened in the browser. Remove the password in Excel (File > Info > Protect Workbook) and save a copy. Files renamed from another format, such as a .numbers file renamed to .xlsx, also fail here.
- "This merge would produce about 612,000 cells, above the limit of 500,000 cells per run. Merge fewer files at a time..."
- The page limits each merge to 500,000 cells so the browser tab does not run out of memory. Split the files into two batches, or delete unused columns before merging. In stacked mode, many columns that appear in only one file add up quickly because every row gets a cell for them.
- A file over 25 MB, or a batch over 100 MB, is refused.
- These are fixed limits per file and per merge. Save very large workbooks as CSV, which is often much smaller once the formatting is gone, or remove sheets you do not need.
- Dates from a CSV show as text instead of dates.
- CSV files carry no type information, and dates such as 03/04/2026 are ambiguous between countries, so the page keeps them as written. Convert the column in Excel with Data > Text to Columns, choosing the date order your file uses.
Best practices
- Choose one sheet per file when each file stands alone or has a different layout, such as a cover sheet and a table, or reports from different systems.
- Choose stacking when every file is the same kind of list, such as transactions or sign-ups, and you want to sort, filter or pivot the combined rows.
- Turn on the Source file column whenever you stack. Without it, there is no way to tell afterwards which file a row came from.
- Read the header check before downloading. Any name listed under missing or extra is a column that did not line up, and fixing the spelling in the source is faster than repairing the merged sheet.
- Keep your original files. Each formula is replaced by its last saved value, so if you correct a figure in the merged workbook, totals that depended on it do not update; make the fix in the source file and merge again.
One sheet per file or stacked rows: which to pick
The two modes answer different questions. One sheet per file answers "put these files in one place": nothing is reshaped, each tab keeps the cells of the original first sheet at the same addresses, with its merged ranges and column widths, and files with completely different columns are fine. It suits month-end packs, collections of reports from different departments, and anything you will read tab by tab.
Stacking answers "give me one list". It only makes sense when the files describe the same kind of record, because the result is a single table with one header row. Once the rows sit together, you can sort by Revenue across all months, filter to one region, or build one pivot table instead of twelve.
If you are unsure, merge with one sheet per file first. It loses nothing about the layout, and you can see whether the headers really are the same before stacking.
How header matching works, step by step
Take the example above. sales-jan.xlsx is first, so the starting columns are Region, Units, Revenue. sales-feb.xlsx has the headers " revenue", "REGION", "Units", "Returns". Each one is trimmed and lower-cased: "revenue", "region", "units", "returns". The first three match existing columns, so February's values land under Revenue, Region and Units even though the file lists them in a different order. "returns" matches nothing, so a new Returns column is added on the right, and January's rows get blanks there.
sales-mar.csv has only Region and Units. Both match, and the Revenue and Returns cells for the West row are left blank. The header check reports Revenue as missing for that file, which is your cue to ask whether March's export left a column out.
If one file repeats a header, for example two columns both called Amount, the first Amount matches the first Amount column and the second matches a second Amount column, rather than both landing in one place.
- Matching ignores case: "REGION" = "Region".
- Matching ignores leading and trailing spaces: " revenue" = "Revenue".
- Matching does not ignore inner differences: "Unit Price" and "UnitPrice" are different columns.
- An empty header cell is named "Column 1", "Column 2" and so on by its position in that file.
- The missing and extra lists always compare against the first file, not against the combined column list.
What the merged workbook does not contain
From each cell, the merge copies the value and, for numbers, the number format. One-sheet-per-file mode also keeps merged cell ranges and column widths; stacked mode does not. Bold headers, fill colours, borders, fonts, row heights and frozen panes are gone, so the result opens as plain cells. Charts, images, shapes, pivot tables and slicers are not copied, and neither is conditional formatting, data validation, cell comments, notes, hyperlinks, named ranges or VBA macros.
Formulas are replaced by the values Excel saved for them. A cell that showed 9,800.00 from =SUM(C2:C14) becomes the number 9,800.00, and it will not change if you edit C2 in the merged file. Formulas that referred to other sheets or other workbooks are converted the same way, which avoids broken links, but it also means the merged file is a snapshot.
Frequently asked questions
Is it free, and are my files uploaded?
It is free with no account. The page reads each file you pick into memory with the browser's file API, and SheetJS, running in the tab, reads each workbook and writes merged-workbook.xlsx, which your browser then saves as a download.
How are the tabs named in one-sheet-per-file mode?
Each tab takes the file name without its extension, so sales-jan.xlsx and sales-feb.xlsx become sales-jan and sales-feb. Characters Excel forbids in sheet names (: \ / ? * [ ]) are removed, so a:b.csv becomes ab. Names longer than 31 characters are cut to 31, and duplicates get " (2)", " (3)" and so on.
Can I merge only some sheets from a workbook?
Not on this page. You get either the first sheet of each workbook or every sheet. To merge a selection, delete the unwanted tabs from a copy of the workbook before adding it.
Will my formulas still work in the merged file?
No. Each formula is replaced by the value it last calculated, so the numbers look the same but no longer update. Keep the original files if you need the formulas.
Can I merge files with different columns?
Yes. In one-sheet-per-file mode the columns do not matter at all. When stacking, columns are matched by header name, columns that only some files have are added on the right, and the header check lists exactly which headers each file was missing or added.
Is there a size limit?
Up to 30 files per merge, 25 MB per file and 100 MB in total, and the merged result can hold up to 500,000 cells. Larger jobs need to be split into batches.