Google表格-找不到脚本功能 [英] Google Sheets - Script function could not be found

查看:78
本文介绍了Google表格-找不到脚本功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Google表格文档中的图像链接到另一个标签中的特定单元格.我正在通过构建一个简单的函数来做到这一点.但是,当我分配功能然后单击图像时,出现错误找不到脚本功能测试"".当我在脚本管理器界面中运行该函数时,它工作正常.是我尝试在带有图片的工作表中实际使用它的时候.

I am working to link an image in my Google Sheet document to a specific cell in another tab. I'm doing this by building a simple function that will do this. However, when I assign the function and then click on the image, I then get the error "Script function "test" could not be found". When I run the function in the script manager interface, it works fine. It's when I try to actually use it in the sheet with the image.

功能脚本:

function test()
{
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName("TX Marketing Data");
  sheet.setActiveRange(sheet.getRange("A91"));
};

重新创建步骤:
1)创建图片
2)转到图像,右键单击,转到下拉菜单,然后选择分配脚本"
3)输入测试"作为分配脚本

Steps to recreate:
1) Create image
2) Go to image, right click, go to drop down and select "Assign Script"
3) Enter "test" as the assign script

推荐答案

删除;"在函数末尾(在}之后).

Remove ";" at the end of your function (after }).

这篇关于Google表格-找不到脚本功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆