How to request or get the permission of google spread sheet access in the apps script of other sheet?

c-an

I am writing apps script of A spread sheet for my custom functions and trying to get values in B spread sheet from there using openUrl()

However, I got ERROR in A spreadsheet when I use the custom function..

in Google Document, it says

If your custom function throws the error message You do not have permission to call X service., the service requires user authorization and thus cannot be used in a custom function.

ref: https://developers.google.com/apps-script/guides/sheets/functions

However, it doesn't say anything how to get the permission..

  1. I tried with sharable link to everyone but it didn't work.
  2. I tried with url&scope=https://www.googleapis.com/auth/spreadsheets

Both way didn't work. How can I solve this problem?

enter image description here

Sourabh Choraria

Unfortunately, what you're asking for cannot be done directly. In the same documentation, please scroll all the way down to sharing; that's -

Custom Functions in Google Sheets > Advanced > Sharing.

Here, you'll see the following -

Custom functions start out bound to the spreadsheet they were created in. This means that a custom function written in one spreadsheet can't be used in other spreadsheets unless...

If it suits you, you can make use of the 3 methods that they've listed there to overcome this problem.

Hope this helps!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

google app script how to get date in string date(spread sheet)

Apps Script "setFormulas" in Google Sheet: how to set the correct row in reference to other sheet?

How to get specific sheet by id in Google Apps script?

How to Preserve Sheet Formats and Translate? ( Google Apps Script, google sheet )

get last update of google sheet in apps script

How to run a Google Apps Script on a hidden sheet

How to get cell value from google spread sheet which in any language and current time of spread sheet in JAVA

How to refer to other sheet in google app script?

Google sheets apps script to get values from other sheet and populate in another with conditions

How to enable other (non-registered) editors to use the Google Apps Script attached to a Google Sheet?

Google Apps script : setValue unable to get results on google sheet

Syntax Error : Google Spread Sheet script

How to Access and Insert Data in to Google Spread Sheet using C# and Sheet Api?

How to get information on hidden rows from Google Sheet API without Google Apps Script

How to get Error Message from a Google sheet cell using Google Apps Script?

How to match and import data from other sheet by using apps script?

How to print the data of an array into a Google sheet with Google Apps Script

How to add the onOpen trigger to a Google Sheet with Google Apps Script?

How to get auto refresh google spread sheet custom cell fuction from google app script [ custom fuction refresh ]

Google Apps Script - How to get email addresses from Sheet 2 and send email

How do I get 5 rows from the end of my sheet in Google Sheets using Apps Script?

How can I get this to protect a sheet on scripting basis (Google Apps Script)?

Google Apps Script: How to get the conditional format rules in a sheet, including the values for each rule

How to get the specific range of row data from google sheet through apps script

How to extract Google sheet formulas in sheet with a script?

Google Apps Script - How to send HTML email from Sheet?

How to extract the pubhtml ID in google sheet using Apps Script?

Google Apps Script how to export specific sheet as csv format

How to embbed a Charts.Chart to Google Sheet (Script Apps)