// Create a new workbook Workbook workbook = new Workbook(); // Open an excel file InputStream fileStream = this.getResourceStream("xlsx/Employee absence schedule.xlsx"); workbook.open(fileStream); // Save to a pdf file workbook.save("ConvertExcelToPDF.pdf");