简体   繁体   中英

Why does Google Spreadsheet not connect to Google Apps Scripts?

For example, if I follow this simple 5 minute tutorial provided by google: https://developers.google.com/apps-script/quickstart/docs , translate.gs and sidebar.html will not connect to the Google Spreadsheet that I created. In this tutorial, the following step is not working for me:

  1. Switch back to your document and reload the page.
  2. After a few seconds , a Translate Quickstart sub-menu will appear under the Add-ons menu. (If you chose a different name for your script, that name will appear instead.) Click Add-ons > Translate Quickstart > Start."

The translate Quickstart sub-menu is not appearing. From what I understand, File > 'Save all' should update my translate.gs and sidebar.html automatically.

No matter how many new google spreadsheets I make with corresponding .gs files, the .gs file functions are not found by it's corresponding spreadsheet.

I have also tried resetting my cache after reading some suggestions online.

EDIT: I was asked for permission when initially running this function through the Script Editor. I granted it permissions and ran the function and received the correct log which can be seen in this image 在此处输入图片说明

Any insight on this strange behavior would be great! Thanks!

Edit: This time when I am asked for permissions, I am unable to give permission to my own app despite this all being done through my account 在此处输入图片说明

The 5 minute Quickstart tutorial you linked is for Google docs. It fails because there is no DocumentApp but only SpreadsheetApp For Google sheets quick start, Go here:

https://developers.google.com/apps-script/quickstart/macros

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM