// Create a new workbook Workbook workbook = new Workbook(); // Add a new worksheet to the workbook. The worksheet will be inserted into the end of the existing worksheet collection. workbook.getWorksheets().add(); //Add a new worksheet to the specified position in the collection of worksheets. workbook.getWorksheets().addBefore(workbook.getWorksheets().get(0)); workbook.getWorksheets().addAfter(workbook.getWorksheets().get(1)); //Set worksheet's name. workbook.getWorksheets().get(2).setName("Product Plan"); // Save to an excel file workbook.save("AddWorksheet.xlsx");