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

Free Support Forum - aspose.com

Aspose.Cells for Java combining worksheet


We are looking for a solution where we can solve the following use case

1. Combine sheets from several excel-documents where the files can be in Excel 97, 2003 or 2007 format?

What can you suggest us to use, can we do this with AposeCells?

Best regards,


Thanks for your inquiry.

Well, you may use Workbook.copy() method to copy the contents and formats from other workbook. Alternatively, you may try to copy worksheets from a workbook to another in b/w workbooks, see the document for your reference:

Copying and Moving Worksheets

Thank you.


Does this also work when you copy a worksheet from version 97 workbook to version 2007 workbook or from 2003 to 2007?

Best regards,

Hi Johan,

Yes, it will work.

Thank you.


Using newer Aspose.Cells for Java, you may merge/combine whole workbooks. See the following sample code to accomplish the task:
Sample code:

Workbook SourceBook1 = new Workbook(dataDir + "charts.xlsx");

// Define the second source book.
// Open the second excel file.
Workbook SourceBook2 = new Workbook(dataDir + "picture.xlsx");

// Combining the two workbooks

// Save the target book file.
SourceBook1.save(dataDir + "combined.xlsx");

Also, see the document for your reference:
Combine multiple worksheets into single workbook

You may also browse different examples on different features for your reference.