Skip to content

Instantly share code, notes, and snippets.

@groupdocs-cloud-gists
Last active March 18, 2025 23:32
Show Gist options
  • Save groupdocs-cloud-gists/e447cbc026892b272f2a3254519fd934 to your computer and use it in GitHub Desktop.
Save groupdocs-cloud-gists/e447cbc026892b272f2a3254519fd934 to your computer and use it in GitHub Desktop.
Perform PDF to Excel conversion

Develop PDF to Excel Converter using Java


This gist sheds details on using a Java REST API for PDF to Excel conversion ensuring accurate data extraction while preserving formatting and structure. This approach streamlines workflows, eliminates manual data entry, and enhances productivity, making it ideal for businesses, financial analysts, and data-driven applications. Let's explore the details on how we can perform this conversion using GroupDocs.Conversion Cloud SDK for Java.



For more details, please visit Convert PDF to Excel Workbook using Java REST API.

pdf to xls

Important Links

Product Page | Docs | Live Demo | API Reference | Code Samples | Source Code | New Releases | Blog | Free Support | Free Trial

Learn the details on how to develop a seamless PDF to Excel workbook converter using Java REST API.
// More examples over https://github.com/groupdocs-conversion-cloud/groupdocs-conversion-cloud-dotnet
// Obtain your API credentials
string clientId = "XXXXXX-XXXXXXXXX-4088-9ca0-55c38f4b7f22";
string clientSecret1 = "XXXXXXXXXXXXXXXXXXXX";
// Create an instance of the Configuration class and initialize it with the Client ID & Client Secret
Configuration configuration = new Configuration(clientId, clientSecret);
// Define the API base URL for PDF to Excel conversion operation
configuration.setApiBaseUrl("https://api.groupdocs.cloud");
// Initialize an instance of ConvertApi with the Configuration object
ConvertApi convertApi = new ConvertApi(configuration);
ConvertSettings settings = new ConvertSettings();
settings.setStorageName("internal");
settings.setFilePath("marketing.pdf");
settings.setFormat("xls");
settings.setOutputPath("myResultant.xls");
// Invoke the ConvertDocument API for PDF to XLS format conversion
ConvertDocumentRequest request = new ConvertDocumentRequest(settings);
List<StoredConvertedResult> response = convertApi.convertDocument(request);
// Check the response and print success message
if (response != null && response.equals("OK")) {
System.out.println("The PDF to Excel conversion completed successfully!");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment