Free Support Forum - groupdocs.com

Java code to coversion of pdf to excel


#1

Hello,


I have find a new api to covert pdf into excel with efficient manner. So, i want to know how to use your api to convert pdf to excel(both one or multiple Sheet). Can send me that java code?

Thanks,

Rakesh Kumar
Adeptia Inc.


#2

Hi Rakesh,


Thanks for taking interest in GroupDocs.Conversion for Java 3.x and posting your query.
Let us brief you, how you can achieve your goal using GroupDocs.Conversion for Java 3.x API. Our document conversion API permits user to convert Pdf documents to Excel with full control (convert a single, multiple or all pages of a Pdf document into single or multiple excel sheets). It comes with following properties:

saveOptions.setPageNumber(2);
Define the page number, you want to convert to excel sheet.

saveOptions.setNumPagesToConvert(2);
Define how many pages you want to convert to excel sheet starting from page number 2 (that is already set in earlier property).

So, considering the above properties, your output will be two excel sheets, page number 2 and 3 of your Pdf document.

Furthermore, you may find following resources helpful:
Download API - GroupDocs.Conversion for Java 3.x
API Documentation - Working with Documents Conversion to Spreadsheet Document Formats
Source Code - Showcases and Example Projects

We would recommend you to evaluate GroupDocs.Conversion for Java 3.x and share your valuable feedback.
We are always here to help you out.
Best Wishes

#3

Hello,


I have not use your api before that you can guide me out their and send me same sample code to how to use these methods.


Thanks,

Rakesh kumar
Adeptia Inc.

#4

Hello Rakesh,


Please go through the code given below, in order to convert any document to excel Spreadsheet format:

/
Convert document to spreadsheet and get result as file path
*/
public static void convertToCellsAsFilePath(String fileName)throws IOException {
// Instantiating the conversion handler
ConversionHandler conversionHandler = new ConversionHandler(Utilities.getConfiguration());
//Initiating file save options.
CellsSaveOptions saveOption = new CellsSaveOptions();
saveOption.setOutputType(OutputType.String);
//Set starting page number
saveOption.setPageNumber(2);
//Set number of pages to convert starting from Start Page Number set above.
saveOption.setNumPagesToConvert(2);
//COnverting document and getting the output file path.
String convertedDocumentPath = conversionHandler. convert(fileName, saveOption);
}

Furthermore, we would recommend you to go through the following resources. These resources will help you in getting started with Next Generation GD.Conversion for Java 3.x

API Download
API Documentation
Showcases and Example Project

#5

Hello,


I tried this example, and I get an excel file where it says “Evaluation only…” but not the text from the original document (the pdf from the examples). Is this because I don’t have a license ? Thanks.

#6

Hi There,


Please go through this article, in order to see evaluation limitations.
You can also request a temporary license to test the functionality of GroupDocs.Converion in full mode. Feel free to visit this page for details on getting a temporary license. We’d like to hear your experience after evaluating the API with temporary license.

Many Thanks

#7

Thank you very much.

I have obtained a temporary license now and I will share my experience after using the API.
Is it possible to get file’s metadata using only the conversion library ?
I can see that this is possible with the viewer, but not with the conversion product. (And I am actually thinking of purchasing only the conversion).

Thanks,
Ivana

#8

Hi Ivana,


We are investigating your scenario. We’ll shortly notify you about the outcomes.
Please stay tuned.

Thanks

#9

Hi Ivana,


Is it possible to get file’s metadata using only the conversion library ?
You cannot get file’s metadata using document conversion API. However, we’ve asked the concerned team about providing this feature in the API. As we get any update from the concerned team, we’ll notify you.

Thanks

#11

@ivanaatanasovska19,

Using latest version of the API, you can avail this feature.