JExcel library provides an effective way to solve various tasks related to tabular format reports processing using integration and full control over Microsoft Excel in Java Swing applications.
You’ll be able to perform any operation on Excel workbooks—create or open, save, modify (not only the workbook data, but also name, title, author, file path, password protection, window caption, size, zoom, state and many other options).
Reference cells by coordinates, address or name, set and get values of different types, convert cells into ranges and vice versa, customize cell appearance, reference range, find values in ranges, obtain ranges intersection, merge/unmerge cells of a range, etc.
Obtain worksheet by its name or index, obtain all worksheets in a workbook, add a new worksheet and assign the name of the new worksheet, move a worksheet to a specified position and remove a worksheet from a workbook etc.
JExcel 1.5. See release notes
By downloading and using JExcel you agree to be bound by the terms and conditions of the Product License Agreement.
With JExcel Workbook and Worksheet classes, you can add listeners to the events generated by a workbook or worksheet as well as process them by handlers to affect respectively the behavior of a workbook or worksheet.
Microsoft Excel sends notifications about the following application events: a new workbook is created, a workbook is opened.
You can listen to workbook activation/deactivation, new worksheet adding to a workbook, workbook saving/closing events.
You can handle various worksheet events: activation/deactivation, changing values and selections, double-click and right-click events.
Using the JWorkbook class as an OLE container, you can add an Excel workbook into a Java Swing application just like an ordinary Swing component and receive functionality for working with its content: open and save an embedded workbook, print it by displaying the Print dialog or directly, display a workbook in a static mode (read-only) or in a normal mode, listen to JWorkbook events.
Using the developer-friendly JExcel API, you can get direct access to any COM interface of the MS Excel COM API to implement functionality that is not yet available in the JExcel API. JExcel provides peers for the following classes: Application, Workbook, Worksheet, Range, and Cell.
mergeWorkbook()
It allows copying all worksheets from the specified workbook into another workbook instance. Using this method you can copy worksheets only but you’ll be unable to do the same with VBA scripts.