Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Load source PDF file
Document doc = new Document("sampletable.pdf");
// Convert PDF to XLS
doc.save("workbook.xls", SaveFormat.Excel);
// Load source PDF file
Document doc = new Document("sampletable.pdf");
// Set Excel options
ExcelSaveOptions options = new ExcelSaveOptions();
// Set output format
options.setFormat(ExcelSaveOptions.ExcelFormat.XLSX);
// Set minimizing option
options.setMinimizeTheNumberOfWorksheets(true);
// Convert PDF to Excel XLSX
doc.save("workbook.xlsx", options);
// Load source PDF file
Document doc = new Document("sampletable.pdf");
// Set Excel options
ExcelSaveOptions options = new ExcelSaveOptions();
// Set output format
options.setFormat(ExcelSaveOptions.ExcelFormat.XLSX);
// Convert PDF to XLSX
doc.save("workbook.xlsx", options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.