简体   繁体   English

谷歌表格按钮打开带有特定插件页面的市场?

[英]Google sheets button to open marketplace with specific addon page?

Is there a way to write an apps script function that opens up google workspace marketplace with a specific addon page?有没有办法编写一个应用程序脚本 function 来打开带有特定插件页面的谷歌工作区市场? I've seen some addons do this.我见过一些插件这样做。

Like I want to create a button drawing on my sheet and assign an apps script function to it that opens up the marketplace on that sheet with a single click.就像我想在我的工作表上创建一个按钮绘图并为其分配一个应用程序脚本 function 一样,只需单击一下即可打开该工作表上的市场。

截屏

You can't open a Dialog like the mentioned你不能像提到的那样打开一个对话框

Google Spreadsheet cannot contain a button that opens an iframe since it's outside docs.google.com Google 电子表格不能包含打开 iframe 的按钮,因为它位于 docs.google.com 之外

As a workaround you can open the add-on link in another tab rather than in a dialog on the same Spreadsheet page.作为一种解决方法,您可以在另一个选项卡中打开附加链接,而不是在同一电子表格页面上的对话框中。 There are several posts related despite they are not the same in your case but pretty much what you are looking for:有几个相关的帖子,尽管它们在您的情况下并不相同,但几乎是您正在寻找的:

The "trick" is done by creating a spreadsheet from a template having an add-on. “技巧”是通过从具有附加组件的模板创建电子表格来完成的。

When a user that have not installed yet the add-on tries to run the add-on, the Marketplace listing will be shown, otherwise the function assigned to the button will be ran.当尚未安装插件的用户尝试运行插件时,将显示市场列表,否则将运行分配给按钮的 function。

Broad steps广泛的步骤

Preparation准备

  1. Create the add-on创建附加组件
  2. Create the spreadsheet to be used as a template创建要用作模板的电子表格
  3. Install / activate the add-on on the spreadsheet在电子表格上安装/激活插件
  4. Add the button and assign on of the the add-on functions.添加按钮并分配附加功能。
  5. Submit the spreadsheet to the template gallery将电子表格提交到模板库

Distribution分配

  1. Use the template to create a new spreadsheet使用模板创建新的电子表格
  2. Share the new spreadsheet to the user(s)与用户共享新电子表格

Use利用

  1. The user open the new spreadsheet用户打开新电子表格
  2. The user clicks the button用户点击按钮

Resources资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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