Microsoft® Excel File Merging via .NET
Combine 2 or more Excel files in a single spreadsheet using C# code
.NET Excel Library provides multiple ways to combine workbooks with various types of content like formulas, data, images, charts and so on into a single spreadsheet file. Supported file formats include XLS, XLSX, XLSB, XLT, XLTX, XLTM, ODS, CSV, TSV and more.
Combine Excel Files with Images and Charts
The simplest way to combine 2 Excel files having images & charts is by calling the Workbook.Combine method. It allows to merge Excel files of similar type into a single spreadsheet.
C# Code to Combine Excel Files
Merge Multiple Excel Files
CellsHelper.MergeFiles method supports merging data, style and formulas of an Excel file to a new spreadsheet of same format. It is an efficient way to merge several files while using caching.
C# Code to Merge Several Excel Files
Merge Excel Files by Copying Worksheets
Worksheet.Copy can used to copy data and formatting from a source worksheet to another worksheet within or between workbooks. The method takes the source worksheet object as a parameter.
C# Code to Copy Worksheets Across Excel Files
Other Supported Merging Formats
Using C#, One can also merge many other file formats including.