Free Support Forum -

How to convert Pdf to Excel file in Java


I doesn’t understand your api properly. Please send me same sample code, how to convert pdf to excel file.

Rakesh kumar
Adeptia Inc.
Hello Rakesh,

Thanks for showing your interests in GroupDocs.Conversion for Java 3.x.

Let me briefly explain you that how you can achieve your goal using GroupDocs.Conversion for Java 3.x API. Our document conversion API allows user to convert PDF documents to Excel Spreadsheets with full control
First you have to initialize an object of ConvertionHandler class by passing an object of ConversionConfig to its constructor..

ConversionHandler conversionHandler = new ConversionHandler(new ConversionConfig());

Now initialize an object of CellsSaveOptions and set the options for Excel Spreadsheet using its object.

CellsSaveOptions saveOption = new CellsSaveOptions();

Now call convert method of ConversionHandler by passing it the path of the source file and the object of CellsSaveOptions class, this method will return path of the converted Excel Spreadsheet.

String convertedDocumentPath = conversionHandler. convert(fileName, saveOption);

Furthermore, please have a look into following resources.:
Download API
API Documentation
Showcases and Example Projects

Best Wishes


Whenever i am runnig the code you have send me it shows same errore as given below:

java.lang.UnsupportedClassVersionError: com/groupdocs/conversion/converter/option/SaveOptions : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(
at java.lang.ClassLoader.defineClass(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
Exception in thread “main”

Please help out thier it urgent.


Rakesh Kumar
Adeptia Inc.


We have an open-source example project for you using that you can easily convert a PDF to Excel format.
We’d recommend you to migrate to latest version of the API that is 20.6. Document conversion is quite simplified since API version 20.x.

Converter converter = new Converter("sample.pdf");
SpreadsheetConvertOptions options = new SpreadsheetConvertOptions();
converter.convert("converted.xlsx", options);

You may find this documentation article helpful.