Merge Files

Introduction

Aspose.Cells provides different ways for merging files. For simple files with data, formatting, and formulas, the Workbook.combine() method can be used to combine several workbooks, and the Worksheet.copy() method can be used to copy worksheets into a new workbook. These methods are easy to use and effective, but if you have a lot of files to merge, you might find that they take a lot of system resources. To avoid this, use the CellsHelper.mergeFiles static method, a more efficient way to merge several files.

Merge Files Using Aspose.Cells

The following sample code illustrates how to merge large files using the CellsHelper.mergeFiles method. It takes two simple but large files, MyBook1.xls and MyBook2.xls. The files contain formatted data and formulas only.