// Create a new workbook Workbook workbook = new Workbook(); workbook.open(this.getResourceStream("xlsx/RepeatTails.xlsx")); IWorksheet worksheet = workbook.getWorksheets().get(1); //Repeat the row 50th at the bottom of each page when saving pdf. worksheet.getPageSetup().setPrintTailRows("$50:$50"); // Save to an excel file workbook.save("ConfigPrintTailRows.xlsx");