To convert an excel spreadsheet to PDF using Qoppa’s library jOfficeConvert, it takes only 2 lines of code:

// Load the document
ExcelDocument excelDoc = new ExcelDocument("input.xlsx", new ExcelConvertOptions());
 
// Save the document as a PDF file
excelDoc.saveAsPDF("output.pdf");