Free Support Forum - groupdocs.com

Pdf to Excel Conversion


#1

Hello,



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



Thanks,
Rakesh kumar
Adeptia Inc.

#2
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();
saveOption.setOutputType(OutputType.String);
saveOption.setPageNumber(2);
saveOption.setNumPagesToConvert(2);

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

#3

hello,



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(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Exception in thread “main”

Please help out thier it urgent.

Thanks,

Rakesh Kumar
Adeptia Inc.

#4

Hello Rakesh,


We are unable to reproduce your issue on our end.
It will be helpful if you can provide us your project and the source file you are trying to convert.

Thank You