Home > Enterprise >  How to run a google script based on (submit Data) from another table?
How to run a google script based on (submit Data) from another table?

Time:09-26

How to run a google script based on (submit Data) from another table ? The table to which the data is to be transferred is transferred by the IMPORTRANGE function enter image description here

CodePudding user response:

Easy, just create a script which access the two sheets and work your magic. Make sure you add a listener to the script in the sheet which serves as trigger.

const sheet1_id = enter Id here
const sheet2_id = enter Id here

const sheet1 = SpreadsheetApp.openById(sheet1_id)

function run(){
  const sheet2 =SpreadsheetApp.openById(sheet2_id) 
  // Do something
}

  • Related