pdf to xls

Convert PDF to Excel workbook with C# .NET.

In the realm of data management, PDF files often serve as repositories for valuable information. However, extracting and manipulating data from these files can be a daunting task, especially when dealing with tabular data. This is where the need for converting PDF to Excel using C# .NET becomes apparent. Furthermore, by transforming PDF to Excel workbooks, you gain the ability to easily access, analyze, and manipulate tabular data in a familiar spreadsheet format.

PDF to Excel Conversion API

With GroupDocs.Conversion Cloud SDK for .NET, the conversion of PDF files to Excel format becomes a breeze. This powerful SDK offers a plethora of features designed to streamline the conversion process and enhance the efficiency. The robust compatibility ensures effortless conversion of even the most complex PDF files. Furthermore, the customizable settings offer precise control over the output, while its cloud-based architecture allows for convenient access anytime, anywhere.

First we need to install the SDK by searching GroupDocs.Conversion-Cloud in NuGet package manager. Another option is to execute the following command in package manager console.

NuGet\Install-Package GroupDocs.Conversion-Cloud -Version 24.4.0

Now we need to obtain our personalized API credentials(i.e. Client ID and Client Secret). Please follow the instructions specified in this short tutorial explaining the details on how to get the API credentials.

Transform PDF to Excel in C# .NET

In this section, we are going to explore the details on delivering accurate and reliable PDF to Excel conversion using C# .NET.

  1. Create an instance of Configuration class where we pass client credentials as arguments.
var configurations = new Configuration(clientId, clientSecret1);
  1. Initialize the ConvertApi where we pass Configuration object as an input argument.
var apiInstance = new ConvertApi(configurations);
  1. Upload the input PDF file to the cloud storage.
fileUpload.UploadFile(new UploadFileRequest("input.csv", stream));
  1. Create an instance ConvertSettings where we specify the name of input PDF, resultant format as xls and the name of resultant Excel workbook as arguments.
var settings = new ConvertSettings{...}
  1. Call the ConvertDocumentRequest API to convert PDF to XLS and save the resultant Excel workbook to the cloud storage.
var response = apiInstance.ConvertDocument(new ConvertDocumentRequest(settings));
pdf to xlsx

Image:- A preview of PDF to Excel conversion.

The input PDF file and the resultant Excel workbook generated above can be downloaded from marketing.pdf and myResultant.xls.

Save PDF as Excel Workbook using cURL Commands

Let’s explore the details on how GroupDocs.Conversion Cloud offers a seamless solution for converting PDF files to Excel workbooks with just a few simple cURL commands. By leveraging the power of this cloud-based conversion service, you can effortlessly transform your PDF documents into Excel format, enabling advanced data manipulation and analysis. This integration not only saves time but also ensures accuracy in preserving the structure and content of your PDF data within the Excel workbook.

Firstly, we need to generate a JWT access token based on client credentials and once we have generated the JWT token, please execute the following cURL command to convert CSV to HTML table and save the resultant HTML in cloud storage.

curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-H "accept: application/json" \
-H "authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d "{  \"StorageName\": \"internal\",  \"FilePath\": \"{sourceFile}\",  \"Format\": \"xls\",  \"LoadOptions\": {    \"Format\": \"pdf\"  },  \"OutputPath\": \"{myResultantFile}\"}"

Please replace sourceFile with the name of input PDF document, myResultantFile with the name of resultant Excel workbook and accessToken with personalized JWT access token.

  • If we need to save the resultant Excel workbook on local drive, please try using the following cURL command:
curl -v "https://api.groupdocs.cloud/v2.0/conversion" \
-H "accept: application/json" \
-H "authorization: Bearer {accessToken}" \
-H "Content-Type: application/json" \
-d "{  \"StorageName\": \"internal\",  \"FilePath\": \"{sourceFile}\",  \"Format\": \"xls\",  \"LoadOptions\": {    \"Format\": \"pdf\"  }}" \
-o "{myResultantFile}"

PDF to Excel Conversion App

Please try using our free PDF to XLSX Converter app. A lightweight and super-efficient App, that is developed on top of GroupDocs.Conversion Cloud REST APIs and enables you to witness the amazing capabilities of REST API.

PDF to XLSX converter


In conclusion, whether you prefer the flexibility of cURL commands or the robustness of .NET REST API, GroupDocs.Conversion Cloud offers a comprehensive solution for converting PDF files to Excel workbooks. We highly recommend you to explore the power of GroupDocs.Conversion Cloud today and streamline your PDF to XLSX conversion workflow with ease.

We highly recommend visiting the following links to learn more about: