I have to work with google spreadsheets. I am using some template spreadsheets which all contain a lot of links to other spreadsheets. The problem is that whenever I make a copy of the template spreadsheet to use most of the links(created with the importrange function) require me to give them access again
What I want to do is make a script that would allow me to import all the links in one press. I tried to make an app script but I can't found any way to access the textbox with the "allow access" button so that i can make my script. My questions are: is there any way to access the "allow access" button programatically? or is there any other way to solve my problem and allow access to all links in one press?
Open the Apps Script project. Click Editor code. Next to Services, click Add a service add . Select Google Sheets API and click Add.
About Granting Access With IMPORTRANGEThe 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.
You can grant the Apps Script API access to your script projects using the Apps Script dashboard. You can also use the dashboard to revoke this access at any time. When you grant the API access, you are doing so for all applications. Individual applications still need to be authorized, however.
I had to face to the same issue. The only way to avoid this Allow Access for importrange is to put the linked document (destination of the importrange) public, or shared by the link, which is public too, but if readers have the link. Then there is no requirement of authorizing importrange. Google should avoid this authorization access if the 2 documents are from the same owner, I don't understand where is the security breach here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With