Convert PDF to Excel in Java [closed]

2020-01-18 09:19发布

How to convert PDF file to Excel using Java. We have generate PDF file using itext. Now we want to convert it to excel. we want sample code to convert pdf to excel. or kindly Suggest API.

1条回答
姐就是有狂的资本
2楼-- · 2020-01-18 09:31

You can convert a PDF document to an Excel workbook with Aspose.PDF API by using below code snippet. Please ensure using Aspose.PDF for Java 18.2 in your environment.

// Load PDF document
Document document = new Document("Test.pdf");
// Instantiate ExcelSave Option object
ExcelSaveOptions excelsave = new ExcelSaveOptions();
// Save the output to XLS format
document.save("ConvertedFile.xls", excelsave);

In case you notice any problem with generated file, please share it with us by uploading it to any file sharing server like Google Drive, Dropbox etc. Also share your environment details (OS details, JDK/JRE version etc) so that we can try to reproduce and investigate the issue to help you out.

I work with Aspose as Developer Evangelist.

查看更多
登录 后发表回答