The Spreadsheet Tools comprise several Web APIs that can convert XLS to CSV, XLS to JSON, XLS to HTML, XLS to TXT, and XLS to XML. It can come in handy when you want to convert your Excel into a simple text file or when you need to move your Excel data to a database.

The Web API is designed to preserve the structure of the original XLS. When XLS is converted to any of the supported file formats such as HTML, the table values are placed in their correct rows and columns in the raw HTML code.

Web API engines work in any programming language: PHP, Javascript, C#, .NET and ASP.NET, Java, Visual Basic, and many others.

PDF.co is fully secure. To learn more, please check out https://pdf.co/security

SIGN UP FOR FREE

Spreadsheet Tools Benefits

Preserved Layout

The Spreadsheet Web API can reproduce the layout of the XLS file when converted to any of the supported formats.

Portable File Formats

The Web API supports the conversion of Excel to lightweight and portable file formats. File formats such as CSV and TEXT don’t need any special software to open and access them.

Web API Supports Multiple Languages

PDF.co platform can be used by software developers from programming languages such as PHP, Javascript, .NET and ASP.NET, C#, Java, Visual Basic, and many others. Find source code samples in our API documentation.

Business Automation Platforms Integrations

If you are not a developer, you can also easily automate your PDF operations via popular business automation platforms: ZapierMakeAirtableSalesforceGoogle Apps Script, and 300+ more.

Enterprise Solutions

For enterprise customers, there is a Dedicated API Server that runs as a dedicated private server with dedicated private cloud storage in the hosting region of your choice.

Spreadsheet Tools Samples & Demo

In this demonstration, we will use the /v1/xls/convert/to/csv endpoint to convert an XLS to CSV. In our sample Excel, we have 2 worksheets named row and column. We will use the worksheetIndex parameter to specify the worksheet that we want to convert.

Below are the images of the sample XLS and the output CSV.

Spreadsheet Tools API Sample XLS And Output CSV
Images of sample XLS and output CSV

Let’s go over the /v1/xls/convert/to/csv endpoint’s parameters and their corresponding functions real quick.

Endpoint

URL: https://api.pdf.co/v1/xls/convert/to/csv
Method: POST
Parameter Description
url required. Link to the source file.
worksheetIndex optional. index of the worksheet to use.
quotationSymbol optional. Must be a String.
separatorSymbol optional. Must be a String.
inline optional. Set to true to return resulted content in the response instead of the link to results.
encrypt optional. Enable encryption to the output file.
async optional. Runs processing asynchronously. Returns jobId to use with job/check: true or false
name optional. Output file name.
profiles optional. Must be a String. Set custom configuration. See profiles examples here

 

cURL Code Snippet

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

Other XLS to CSV cURL source code samples are available here.

Let’s see the XLS to CSV API in action.

Spreadsheet Tools API CSV Output
Images of XLS to CSV in action

The XLS to CSV API JavaScript sample code is available here.

Sign Up