How to Convert Sales Orders to XLS using PHP

In this tutorial, we will show you how to convert sales orders to XLS using PDF.co and Zapier.

Here’s the sample PDF file and the converted XLS output.

Source PDF File and XLS Output
Source PDF File and XLS Output

Step 1: Source Code

First, copy the PHP and HTML source code from our documentation. Then, save it in a folder inside the /www or /htdocs directory depending on whether you are using XAMPP or WampServer.

Saving the source code

Step 2: Start Apache Server

On your control panel start the Apache module so we can run the program on our browser.

XAMPP control panel

Step 3: Run the Program

Let’s run the program.

  • Type in the localhost/Folder Name/HTML File on your browser.
  • Next, add your API Key. You can get the API key in your PDF.co dashboard.
  • Then, input your source PDF file and click the Proceed button to send a request.
Running the program

Step 4: Conversion Result

Once the program runs successfully, click on the URL to download the XLS file.

Click the URL to download the XLS file

Step 5: XLS Output

Here’s the PDF to XLS in action.

PDF to XLS in Action
PDF to XLS in Action

In this tutorial, you learned how to convert a sales order into XLS using PHP. You learned how to set up the code samples to get the XLS output. You also learned how to use the PDF.co Web API to convert PDF files into XLS format.