On this page
A spreadsheet file contains data in the form of rows and columns. A spreadsheet file can be saved in several different file formats, each having a different file extension for unique representation. Data is stored in cells either in plain form such as text string, numbers, date, currency, etc. or as formulas that change a cell’s value when referenced cell values change.
Common spreadsheet file extensions and their file formats include XLSX (Microsoft Excel Open XML Spreadsheet), ODS (OpenDocument Spreadsheet) and XLS (Microsoft Excel Binary File Format).
XLSX is well-known format for Microsoft Excel documents that was introduced by Microsoft with the release of Microsoft Office 2007. Based on structure organized according to the Open Packaging Conventions as outlined in Part 2 of the OOXML standard ECMA-376, the new format is a zip package that contains a number of XML files. The underlying structure and files can be examined by simply unzipping the .xlsx file.
GroupDocs.Merger allows developers to merge XLSX files when it’s needed to organize multiple XLSX files into single document or send fewer attachments etc. And you can do this without any third-party software or manual work involved. With GroupDocs.Merger it is possible to combine XLSX documents of any size and structure - all text, images, tables, graphs, forms and other content will be preserved.
The following example demonstrates how to merge XLSX files with several lines of java code:
- Create an instance of Merger class and pass source XLSX file path as a constructor parameter. You may specify absolute or relative file path as per your requirements.
- Add another XLSX file to merge with join method. Repeat this step for other XLSX documents you want to merge.
- Call Merger class save method and specify the filename for the merged XLSX file as parameter.
// Load the source XLSX file Merger merger = new Merger("c:\sample1.xlsx") // Add another XLSX file to merge merger.join("c:\sample2.xlsx"); // Merge XLSX files and save result merger.save("c:\merged.xlsx");
Please find more use-cases and complete Java sources of our backend and frontend examples and try them for free!
GroupDocs.Merger for Java provides an online XLSX Merger App, which allows you to try it for free and check its quality and accuracy.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.