How to Select Random Pages of Excel to Make a PDF using Web API

In this tutorial, we will show you how to select random pages of Excel to make a PDF using Web API.

We will use this sample Excel document with 3 worksheets in this tutorial.

Sample Excel Document
Sample Excel Document

Step 1: Log in to Account

  • To begin. First, log into your account and click on the Request Tester menu.
Request Tester

Step 2: Request Tester Page

  • Once you’re on the Request Tester page, select /xls/convert/to/pdfthe Choose API endpoint field. This endpoint will convert the Excel file to PDF.
  • For the Input parameters field, add your source file with a link or input with a file.
  • Then, enter the sample JSON code. The worksheet index parameter will allow you to specify which specific sheets you want to convert to PDF. The worksheet index starts at “0” sheet 1 and the worksheet index “1” represents sheet 2.
Request Tester Page

Once you are done setting up, click on the Run Request button to see the result.

Step 3: Run Request Result

  • Great! The successfully process our request. You can copy and paste the URL to view the output.
Run Request Result

Step 4: Generated PDF Output

  • Here’s the generated PDF output from selected Excel pages or worksheets.
Generated PDF Output
Generated PDF Output

In this tutorial, you learned how to select random pages of Excel to make a PDF using Web API. You also learned how to use the /v1/xls/convert/to/pdf endpoint to convert XLS to PDF format.

This is just one of the examples of the Web API’s functionality. You can do a lot more, such as generating PDFs using Airtable linked records, merging or splitting PDF files, and many others.