Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active August 9, 2021 19:54
Show Gist options
  • Save aspose-com-gists/54bc1b3bf672553e34f2b7a317cffb6c to your computer and use it in GitHub Desktop.
Save aspose-com-gists/54bc1b3bf672553e34f2b7a317cffb6c to your computer and use it in GitHub Desktop.
Convert PDF Documents to Excel XLS/XLSX using Java
// 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);
@farhan-raza
Copy link

@mohamedzulfihar,

You can resolve this issue and evaluate the API without any limitations by requesting a Free Temporary License. Moreover, you can find more information about the topic at Convert PDF to Excel XLS or XLSX using Java.

In case of any queries, please feel free to contact us at the Free Support Forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment