In this tutorial, we will show you how to merge all rows to PDF and save them back to Google Drive with PDF.co using Google Apps Script

  1. Open the Spreadsheet
  2. Extensions Menu and Apps Script
  3. Apps Script Editor
  4. Setup Code
  5. Run Apps Script
  6. Finish Apps Script
  7. Script Result

The following image shows the Google Drive folder with the spreadsheet and the output file.

Google Drive Folder with Spreadsheet and Output File
Google Drive Folder with Spreadsheet and Output File

Step 1: Open the Spreadsheet

  • To begin. First, open the Spreadsheet from your Google Drive folder.

Open the Spreadsheet

Step 2: Extensions Menu and Apps Script

  • Next, click on the Extensions menu and select the Apps Script.

Add Extensions and Apps Script

Step 3: Apps Script Editor

  • Then, enter the sample code. You can get the source code at this link.

Apps Script Editor

Step 4: Setup Code

  • In line 6, enter your PDF.co API Key. You can obtain your PDF.co API key by signing up at PDF.co at this link.
  • In line 9, type in your desired output file name.
  • For lines 12 and 13, add the number of your starting row and column.
  • For lines 14 and 15, enter the value of all rows and columns containing your files to merge.

Setup Code

Step 5: Run Apps Script

  • After setting up the code, you may now run the Apps Script.

Run Apps Script

The Apps Script are executed successfully, Go back to the Spreadsheet to finish the script.

Step 6: Finish Apps Script

  • Click on the PDF.co menu and press Merge All Rows to run the script.

Finish Apps Script

Step 7: Script Result

  • Once the script is finished, check your Google Drive folder to see the result.

Result

In this tutorial, you learned how to merge all rows to PDF and save them back to Google Drive with PDF.co using Google Apps Script.

Related Pages:

Related Samples: