PDF to Excel API Benefits

Arranged Excel as Output

Since the PDF.co engine analyzes input PDF documents and reproduces the original arrangement of tables and texts. You can get an organized XLS/XLSX output compared to other PDF to Excel converter tools.

Supports scanned and damaged text

Using our built-in OCR (Optical Character Recognition) which supports PDF files with mixed content and multiple languages. PDF.co can easily convert scanned and damaged texts inside your PDF.

API and Business Automation Platforms Integrations

The following programming languages are available for software developers on the API platform: C#, Java, Javascript, PHP, .NET and ASP.NET, Visual Basic, and more.

In case you are not a programmer, there is an option to easily automate your PDF activities through automation platforms such as ZapierIntegromat, UiPath, BluePrism, Automation Anywhere, and others.

On-Prem and Private Instances for Enterprise

PDF.co platform runs on secure and certified cloud infrastructure but Enterprises requiring to process sensitive data in-house can go with the on-premise version.

Sign Up


PDF to Excel API Sample & Demo

For this demo, I am going to use a Sample PDF File.

Screenshot of Souce File
Screenshot of Source File

We’ll be using the code snippets below which are written in different programming languages which will convert the Sample PDF file above into Excel.

The final result will look like this.

Screenshot of XLS Output
Screenshot of XLS Output

Before we proceed with the code, let us first check the /v1/pdf/convert/to/xls parameters and its uses.


URL: https://api.pdf.co/v1/pdf/convert/to/xls
Method: POST
Parameter Description
url required. Link to the source file.
lang optional. English by default. Sets OCR (image to text extraction) language to be used for scanned PDF when the scanned document is detected or input is PNG, JPG images. Other supported values: eng, spa, deu, fra, jpn, chi_sim, chi_tra, kor. You can also specify two languages to be used on the same page, for example, eng+deu, jpn+kor, or other combinations.
inline optional. Must be one of: true to return data as inline or false to return link to the output file (default).
unwrap optional. Unwrap lines to a single line within table cells when lineGrouping is enabled. Must be one of true or false.
pages optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts with (zero). To set a range use the dash , for example: 0, 2-5, 7-.
rect optional. Defines coordinates for extraction, e.g. 51.8, 114.8, 235.5, 204.0. Must be a string.
encrypt optional. Enable encryption for the output file: true or false
async optional. Runs processing asynchronously. Returns jobId to use with job/checktrue or false
name optional. Output file name.
profiles optional. Must be a String. Set custom configuration. See profiles examples here
lineGrouping optional. Line grouping with table cells. Set to 1 to enable the grouping. Must be a string.


Now we are ready to write some codes.

cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/pdf/convert/to/xls' \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf"

This sample code and other cURL sample codes are available here.

Now let’s see this program in action.

Output XLS using cURL
Output XLS using cURL


The sample codes for PDF to Excel in JavaScript are located here.

The sample codes for PDF to Excel in PHP are located here.

The sample codes for PDF to Excel in Java are located here.

The sample codes for PDF to Excel in C# are located here.

Sign Up

Related Pages:

Related Samples: