
How to Merge Excel Files: Easy Methods (2026)
Merge multiple Excel files (XLS & XLSX) using free online tool, Python pandas, VBA macros, or Power Query. Complete guide for append rows, separate sheets, and header matching.
Combining multiple Excel workbooks into one report is a time sink. Instead of toggling between windows, drop your .xlsx or .csv files here and merge the cell values into one output. It’s useful for consolidating monthly reports or inventory lists without manual copy-paste.
Drop Excel files or click to browse
Supports .xlsx and .csv files • best under 20.00 MB per file
Choose the right approach for your data
| Feature | Append Rows | Separate Sheets | Merge by Header |
|---|---|---|---|
| When to Use | Files share the same column structure | You need data separated by source file | Files have overlapping but different columns |
| Output Structure | Single sheet with all rows stacked | One sheet per source file in one workbook | Single sheet with a union of header names |
| Header Handling | Uses first file headers, skips duplicates | Each sheet retains its own headers | Aligns rows into a unified header set |
| Best For | Monthly reports, survey batches, log exports | Department data, multi-source archival | Mixed schemas, supplier catalogs, CRM exports |
Four simple steps
Upload multiple .xlsx or .csv files. Data is processed locally in your browser.
Stack rows vertically, combine as separate sheets, or align rows by matching header names.
Large workbooks are checked against browser size and ZIP-expansion guardrails before parsing.
Download a clean .xlsx or CSV output with the merged cell values.
Python & VBA
Merging Excel files in Python is efficient using the openpyxl or pandas library. With pandas, use pd.read_excel() to load each workbook, then pd.concat() to combine sheets. The ExcelWriter class lets you write multiple sheets to one output file. Choose library options carefully if you need to preserve formulas, formatting, charts, or pivot tables.
import openpyxl
import glob
merged_wb = openpyxl.Workbook()
merged_ws = merged_wb.active
header_written = False
for filepath in glob.glob("*.xlsx"):
wb = openpyxl.load_workbook(filepath)
ws = wb.active
for i, row in enumerate(ws.iter_rows(values_only=True)):
if i == 0 and header_written:
continue # skip duplicate headers
merged_ws.append(row)
header_written = True
merged_wb.save("merged_output.xlsx")
print(f"Merged {len(glob.glob('*.xlsx'))} files successfully.")Merging Excel files with VBA (Visual Basic for Applications) gives you full control within Excel itself. Use Workbooks.Open() to load each file, then loop through sheets and copy them to a master workbook with Sheets.Copy. VBA is often a better fit when formulas, charts, pivot tables, or conditional formatting matter. This is ideal for users who need to merge files directly in Excel without external tools or programming languages.
Sub MergeWorkbooks()
Dim FolderPath As String, FileName As String
Dim DestWB As Workbook, SrcWB As Workbook
Dim DestWS As Worksheet, SrcWS As Worksheet
Dim LastRow As Long, NextRow As Long
FolderPath = "C:\Reports\"
Set DestWB = ThisWorkbook
Set DestWS = DestWB.Sheets(1)
NextRow = 2 ' Start after header row
FileName = Dir(FolderPath & "*.xlsx")
Do While FileName <> ""
Set SrcWB = Workbooks.Open(FolderPath & FileName)
Set SrcWS = SrcWB.Sheets(1)
LastRow = SrcWS.Cells(SrcWS.Rows.Count, 1).End(xlUp).Row
SrcWS.Range("A2:Z" & LastRow).Copy _
DestWS.Range("A" & NextRow)
NextRow = DestWS.Cells(DestWS.Rows.Count, 1).End(xlUp).Row + 1
SrcWB.Close SaveChanges:=False
FileName = Dir()
Loop
MsgBox "Merge complete!"
End SubCommon questions
In-depth walkthrough
This tool combines multiple .xlsx or .csv files into one workbook. Each input file becomes a separate sheet in the merged output, or rows can be appended into one sheet depending on the merge mode you choose.
For normal tool use, file contents are processed locally in your browser instead of being uploaded for server-side merging. The page may still load site ads, analytics, and other third-party scripts described in the privacy policy.
It's completely free with no signup required. Just drop your Excel files in, click merge, and download the result.
Works with modern .xlsx files and .csv exports. If you have an older .xls workbook, save it as .xlsx first.
Use "merge as separate sheets" when each file has different data and you want to keep them organized in one workbook. For example, if you have monthly sales reports and want January, February, and March each on their own tab in one file.
Use "stack rows" when all files have the same column structure and you want one continuous dataset. This is perfect for export files from the same system, like combining weekly reports into one master list.
If your columns don't match exactly, use the Merge by Header option. Append Rows stacks columns by position, while Merge by Header creates a unified header set and fills blanks where a row does not have that column.
Most people use row stacking for identical file structures and separate sheets when the files contain different types of data.
Merged cells in the source files can cause unexpected row structure in the output. If you have cells merged across multiple columns or rows, unmerge them before uploading. In Excel, select the merged cells and click Unmerge Cells in the Alignment section.
Formulas referencing other sheets won't work after merging unless the referenced sheet is also in the output. For example, if Sheet1 has a formula =Sheet2!A1 but Sheet2 isn't included in the merge, you'll get a #REF error. The tool extracts calculated values, not formulas.
Files with password protection need to be unlocked before merging. The tool can't read password-protected Excel files. Open them in Excel, remove the password (File > Info > Protect Workbook > Encrypt with Password, then delete the password), save, and try again.
Very large workbooks can be slow or unsafe in the browser. The tool blocks oversized files and unusually compressed .xlsx files before parsing. For massive datasets, use Python with openpyxl or pandas instead of the browser tool.
If your merged file has weird blank rows or misaligned data, check that all source files have the same column headers spelled exactly the same way. Even a space or capitalization difference will create separate columns.
If you need to merge Excel files automatically as part of a script or workflow, use Python with the openpyxl library. Install it with pip install openpyxl, then use openpyxl.load_workbook() to read files and append rows to a new workbook.
For data analysis, pandas is easier: pd.read_excel() to load each file, pd.concat() to stack them, then df.to_excel() to save the result. This handles column alignment automatically.
Both libraries handle .xlsx files, and pandas can also read legacy .xls files when the xlrd library is installed.
Hand-picked guides to go deeper

Merge multiple Excel files (XLS & XLSX) using free online tool, Python pandas, VBA macros, or Power Query. Complete guide for append rows, separate sheets, and header matching.

Compare the best SVG editors for Linux, including Inkscape, Boxy SVG, SVGEdit, Figma, Vectr, LibreOffice Draw, Karbon, and Xfig for vector workflows.

Compare the best SVG editors for Mac, including Boxy SVG, Inkscape, Affinity, Linearity Curve, Sketch, Figma, Illustrator, and Amadine for clean vector workflows.