// Create a new workbook Workbook workbook = new Workbook(); // Load template file from resource InputStream templateFile = this.getResourceStream("xlsx/Template_HotelBooking.xlsx"); workbook.open(templateFile); //No data needed //Invoke to process the template workbook.processTemplate(); // Save to an pdf file workbook.save("HotelBooking.pdf");
// Create a new workbook var workbook = Workbook() // Load template file from resource val templateFile = this.getResourceStream("xlsx/Template_HotelBooking.xlsx") workbook.open(templateFile) //No data needed //Invoke to process the template workbook.processTemplate() // Save to an pdf file workbook.save("HotelBooking.pdf")