We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save multiple excels into one excel

Hi Team,

I am using aspose.cells and i have to save multiple excel files into one excel file so that i can convert it into a consolidated PDF.

Could you please let me know how can i concatenate multiple excel files into one consolidated excel.


Thanks for your query.

Well, you may use number of ways to add/merge different sheets of workbooks into on file. You may try to browse different sheets of a workbook (you may try some loop) and copy them to other workbook using Worksheet.Copy() method, see the document for reference: https://docs.aspose.com/display/cellsnet/Copying+and+Moving+Worksheets#CopyingandMovingWorksheets-CopyWorksheetsbetweenWorkbooks

Alternatively you can use Workbook.Copy or Workbook.Combine methods if it fits your need, see the following document for your reference:
Sample code:

 var workbook = new Workbook("e:\\test2\\test.xlsx");
            var workbook2 = new Workbook("e:\\test2\\test2.xlsx");

Hope, this helps a bit.