Tuesday, 23 May 2023

Create a Google Doc for a single row of Sheet data

The following Google Apps Script is designed to create a Google Doc for the selected row of data in a Google Sheet and to include some of that data within the new Doc. it also creates a link to the new Doc back in the Sheet on the relevant row.

This tool is a singular / simplified version of my Bulk create Google Docs from Google Sheet data one.

Screenshot of Sheet data to create a Doc for
Screenshot of Sheet data to create a Doc for




Download

Create a Google Doc for a single row of Sheet data download folder (please make a copy of each of the files for your own version).


4 comments:

  1. I am trying to add another menu item based on your script but I'm not sure how to reference it after the last LogEvent, can you help?

    ReplyDelete
    Replies
    1. Hi

      You need to insert it inside of the 'onOpen()' Function:

      function onOpen() {

      SpreadsheetApp.getUi()
      .createMenu('Create Doc')
      .addItem('Create Doc', 'getSpreadsheetData')
      .addItem('Another Item Here', 'functionName')
      .addToUi();

      }

      Delete
  2. Thanks this was really useful and will save me a lot of hassle. I found it easy to adapt it to pick up multiple variables from the spreadsheet row to use in my document.

    ReplyDelete