Home / Combine Excel files

Combine Excel files into one

Drop two or more Excel or CSV files and get one sheet with every row, or one workbook with a sheet for each file. Rows are lined up by column name, so the columns do not have to be in the same order.
Your files never leave your device: they are read and written by this page. No upload, no sign-up.

Result
Sheets
Columns

How to combine Excel files

  1. Choose or drop the files: .xlsx, .xlsm, .xls, .ods and .csv files can be mixed. They are combined in the order of the list; use the arrow to move a file up.
  2. Pick the result. Excel, one sheet stacks every row under one header. Excel, one sheet per file puts each file in its own sheet of one workbook. CSV file gives one CSV.
  3. Choose First sheet of each file or Every sheet if your workbooks have several sheets.
  4. Select Combine files, check the preview, and download.

One sheet, or one sheet per file?

ResultWhat you getUse it when
Excel, one sheetEvery row from every file under one header row. Columns are matched by name; a file without a column gets empty cells there. Add a Source file column to see where each row came from.Monthly or regional files with the same kind of data, which you want to sort, filter or pivot together.
Excel, one sheet per fileOne workbook. Each Excel sheet is copied as it is; each CSV file becomes a sheet. Sheets are named after the files.You want the files together in one workbook but kept apart.
CSV fileThe stacked rows as one UTF-8 CSV file, as values you see in Excel.The result goes into another app or a database.

Sheet names in Excel cannot be longer than 31 characters or contain / \ ? * : [ ], so long file names are cut and those characters become spaces. Two files with the same name get (2) after it.

What survives when you combine: we checked cell by cell

We made two workbooks with openpyxl 3.1.5, each with a bold header row on a yellow fill, a ZIP code stored as text (00721), a 16-digit card number stored as text, a date, an amount in a currency format, a SUM formula with its result, a merged cell, a wider column and a second sheet. We combined them here in Chrome 152 and read every cell of the results back with SheetJS 0.18.5 and from the file's own XML.

In the sourceExcel, one sheetExcel, one sheet per file
ZIP code 00721 stored as textKept as textKept as text
16-digit number stored as textKept, all 16 digitsKept, all 16 digits
DateStill a dateStill a date
Currency format $1,234.50KeptKept
Formula =SUM(E2:E3)Its result, 1,323.50Formula and result
Merged cellNot mergedKept
Wider columnDefault widthKept
Bold text, yellow fillLostLost
Second sheetIncluded only with Every sheet

Fonts, fills and borders are lost because the free SheetJS library this page uses does not write them. Everything that changes what a cell is survives: text stays text, numbers stay numbers, dates stay dates.

One thing surprised us: each workbook's Total row and its "Checked by finance" note were stacked with the data, in the middle of the combined sheet. Any tool that stacks rows does the same, because a total row looks like any other row. Delete totals and notes before combining, or filter them out after: the Source file column tells you where each one came from.

This is also why combining the workbooks directly beats the common detour of saving each one as CSV and merging the CSV files. Opened in Excel, a CSV loses leading zeros and every digit after the 15th, as Microsoft documents; the workbooks combined here never pass through that step.

How to combine Excel files in Excel itself

To put sheets from several workbooks into one workbook, use Move or Copy:

  1. Open both workbooks: the one with the sheet, and the one it should go to.
  2. Right-click the sheet tab and choose Move or Copy.
  3. Under To book, choose the other workbook (or (new book)), and pick where in Before sheet.
  4. Tick Create a copy to keep the original, and select OK. Repeat for every sheet.

Microsoft notes that Move or Copy is not available in Excel for the web, and that formulas and charts that refer to a moved sheet should be checked afterwards.

To stack the rows of many workbooks into one table, use Power Query: put the files in one folder, then Data, Get Data, From File, From Folder, Combine, Combine & Load, and pick the sheet to use from the sample file. Microsoft says each file "should have the same schema with consistent column headers, data types, and number of columns", and that columns are matched by name.

Related tools

Questions

How do I combine two Excel files into one?

Drop both files on this page, choose Excel, one sheet (rows together) or Excel, one sheet per file (sheets together), select Combine files and download.

How do I combine multiple Excel files into one workbook with separate sheets?

Choose Excel, one sheet per file. Each file becomes its own sheet, named after the file. Choose Every sheet to bring in all the sheets of each workbook.

Can I combine Excel files with different columns?

Yes. In one sheet, columns are matched by header name and every column appears once; files without a column get empty cells in it.

Is formatting kept?

With Excel, one sheet per file: values, number formats such as currency and dates, formulas, merged cells and column widths are kept. With Excel, one sheet: values and number formats are kept, and formulas become their results. Fonts, colors and borders are not kept in either, because the free library this page uses does not write them.

Can I combine .xls, .ods and CSV files with .xlsx files?

Yes. Any mix of .xlsx, .xlsm, .xls, .ods and .csv files works, and the result is an .xlsx file or a CSV file.

How many rows can the combined sheet have?

An Excel sheet holds at most 1,048,576 rows, Microsoft's limit. For more, choose CSV file or Excel, one sheet per file.

Are my files uploaded?

No. Your files are read and combined by this page on your device. The page downloads the free SheetJS library to read and write Excel files; your data is not sent with it.

Sources