How do I give permission to Importrange in Google Sheets?

How do I give permission to Importrange in Google Sheets?

About Granting Access With IMPORTRANGE

  1. Spreadsheets must be explicitly granted permission to pull data from other spreadsheets using IMPORTRANGE.
  2. The first time the destination sheet pulls data from a new source sheet, the user will be prompted to grant permission.

How do I change permissions on Google Sheets?

To make it so only you can share:

  1. Open the homescreen for Google Drive, Google Docs, Google Sheets, or Google Slides.
  2. Click Share or Share .
  3. At the top, click Settings .
  4. Uncheck Editors can change permissions and share.
  5. Click Done.

How does importrange work in a Google Sheet?

The first time the destination sheet pulls data from a new source sheet, the user will be prompted to grant permission. Once access is granted, any editor on the destination spreadsheet can use IMPORTRANGE to pull from any part of the source spreadsheet.

How to allow access for importrange function in JavaScript?

However, I’m trying to find a way to do this via a script because I’m creating many spreadsheets, each with a query-importrange function (I ‘own’ the spreadsheet which has data to import). There’s too many for me to manually ‘allow access’ via the pop up and update the function to include the query function.

When do you enter an importrange function in a spreadsheet?

When you enter an importrange function manually into a spreadsheet you receive a pop up and must ‘allow access’. However, I’m trying to find a way to do this via a script because I’m creating many spreadsheets, each with a query-importrange function (I ‘own’ the spreadsheet which has data to import).

How to import a spreadsheet from Google Docs?

IMPORTRANGE (“https://docs.google.com/spreadsheets/d/abcd123abcd123”, “sheet1!A1:C10”) spreadsheet_url – The URL of the spreadsheet from where data will be imported. The value for spreadsheet_url must either be enclosed in quotation marks or be a reference to a cell containing the URL of a spreadsheet.