Tuesday 8 November 2022

Bulk convert Google Sheets to PDFs

As of February 2023 'Convert Drive Files' is now available as a Google Workspace Marketplace Add-on.

The following Google Apps Script tool is designed to bulk convert all Google Sheets (only) within a given Google Drive folder into PDFs. You can choose the destination folder for the PDFs to be put into and also whether you want the original Sheets to be deleted.

Bulk convert Google Sheets to PDFs using Apps Script
Bulk convert Google Sheets to PDFs using Apps Script

Features

  • Maximum runtime - in order to prevent the tool from reaching the limits imposed by Google you can adjust the number of minutes the tool can run for. Change this in the 'GlobalVariables.gs' file in the Script Editor.
  • Continue from where it left off - if you have a lot of Google Sheets to convert and the above runtime is reached the tool will save its progress and prompt you to run it again, avoiding any file duplication.
  • HTML popup - as well as the 'Log' sheet the tool displays a direct popup to the user if it encounters a problem.
  • PDF counter - after successfully running the tool will include the number of PDFs created as part of the success popup to the user.



Download

Bulk convert Google Sheets to PDFs download (please use 'File' > 'Make a copy' for your own version).

As of February 2023 'Convert Drive Files' is now available as a Google Workspace Marketplace Add-on.


4 comments:

  1. Hi, there is please an option to make the file name a s header title automactly ? Thanks

    ReplyDelete
    Replies
    1. Hi Zalmen
      You mean a header title directly in the PDF file that is being created? Or as a header title in the Google Sheet before conversion to a PDF? Not something that is part of this tool unfortunately but could be achievable depending on your requirements.
      Ta

      Delete
  2. Hi Phil,
    Thank you for your anwser, yes i mean a header title only on pdf (the same way that we can print as pdf and choose that option)

    ReplyDelete
    Replies
    1. I understand. I'm not aware of a way (though I have not fully explored all of the export options) to achieve this, like you can when working directly with PDFs in an application.
      Ta

      Delete