The Excel to PDF API can convert XLS, XLSX, or CSV spreadsheets into PDF. The API supports worksheet selection so when you have multiple worksheets in a spreadsheet, you can choose a specific worksheet to convert to PDF.
All files generated using our API are temporarily stored on our server. To learn more about PDF.co Security, please check out this page https://pdf.co/security
Excel to PDF Benefits
Ease of Use
The Excel to PDF API is very easy to use. It comes with a ready-made template so you can replace the parameters’ values with your own and get the result right away.
Large File Support
The API supports large file conversion. It can process files with over 10MB file size. It is considered a best practice to enable the async parameter when dealing with large files. This will return a Job ID that you can use to check the job status.
File Portability
The API can help you convert your Excel file to PDF for safekeeping, archiving, and portability. It cannot be modified but can easily be shared and printed. It can be read using Adobe Reader and other programs or applications such as browsers.
Web API and Business Automation Platforms Integrations
PDF.co platform can be used by software developers from programming languages such as Javascript, PHP, Java, .NET and ASP.NET, C#, Visual Basic, and many others.
If you are not a developer then you can also easily automate your PDF operations through business automation platforms such as Zapier, Integromat, and hundreds of others.
Excel To PDF Samples & Demo
In this demonstration, we will use an Excel file with two worksheets and convert the first worksheet into a PDF. To do this, we will use the /xls/convert/to/pdf endpoint. The graphic below shows the Excel file and the PDF output.
Excel to PDF API sample Excel and its PDF output
Let’s go over the /xls/convert/to/pdf endpoint’s parameters and their corresponding functions real quick.
Endpoint
URL: | https://api.pdf.co/v1/xls/convert/to/pdf |
Method: | POST |
Parameter | Description |
url | required. URL to the source file. |
encrypt | optional. Enable encryption for the output file. Must be one true or false . |
async | optional. Runs processing asynchronously. |
worksheetIndex | optional. default worksheet index (zero by default). |
name | optional. name of the output file. |
profiles | optional. Must be a String. Set custom configuration. See profile examples here |
cURL Code Snippet
curl --location --request POST 'https://api.pdf.co/v1/xls/convert/to/pdf' \ --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" }'
The Excel to PDF Web API cURL source code samples are available here.
Let’s see the Excel to PDF Web API in action using our cURL sample code.
XLS to PDF API Demo
The Excel to PDF Web API JavaScript source code samples are available here.