How to copy one entire Excel sheet into another Excel sheet of the same workbook, using Java SE and Apache POI?
Duplicate Worksheets within a WorkbookLoad an Excel file using LoadFromFile() method. Get the specific worksheet from workbook using get() method. Add a new blank sheet to the workbook using add() method. Copy the original worksheet to the new sheet using copyFrom() method.
You'll probably want the cloneSheet(sheetNumber) method on the Workbook. See the JavaDocs for details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With