重用脚本或发布私有的Google表格脚本插件,而无需gsuite或做生意 [英] reuse script or publish a private google sheets script add-on without gsuite or being a business

查看:91
本文介绍了重用脚本或发布私有的Google表格脚本插件,而无需gsuite或做生意的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在个人Google帐户的多个工作表之间重用Google Apps脚本,而不必公开发布该脚本.我试图避免的一种方法是简单地将脚本复制并粘贴到我使用的每张纸之间.

I'd like to reuse a Google Apps Script between multiple sheets on my personal Google account without publishing the script publicaly. One approach that I'm trying to avoid is to simply copy and paste the script between each sheet that I'm using.

经过阅读后,我的印象是,这通常是通过发布加载项来完成的.我也觉得这可以(或可以)私下完成,因此不需要代码审查,也不需要支付任何费用.我在SO上找到的大多数相关问题似乎都已过时(答案是chrome网上商店,而不是GSuite Marketplace),或者太简单了(通过发布附加组件共享),或者提到了gsuite用户/管理员等.

After some reading my impression is that this is typically done by publishing an add-on. I am also under the impression that this can (or could) be done privately, so that no code review is needed and you don't need to pay anything. Most of the related questions I've found on SO seem to have out of date answers (chrome web store instead of GSuite Marketplace) or are too simple (share by publishing an add-on) or refer to gsuite users/admin, etc.

假设我需要发布一个插件才能在所有工作表中轻松共享,我被告知我需要将项目转换为Google Cloud Project.因此,我创建了一个Google Cloud Project,然后转到资源-Cloud Platform项目"并输入我的项目编号,将我的代码传输到该项目.但是,当我这样做时,它告诉我需要为该项目启用oauth,它会将我带到一个页面,该页面看起来需要正式的代码审查.

Assuming I need to publish an add-on to get easy sharing across all of my sheets I'm told I need to convert my project to a Google Cloud Project. So I created a Google Cloud Project and then went to transfer my code to that project by going to "Resources - Cloud Platform project" and entering my project number. However, when I do that it tells me that I need to enable oauth for the project and it takes me to a page which looks like it will require formal code review.

我的印象是,如果我是组织,则可以进行私人发布.因此,我回到了Google Cloud Console,并试图创建一个组织.但是在这里,似乎要么我需要订阅GSuite,要么我需要启用Cloud Identity.后者似乎仅与企业有关,因为在注册过程中,它要求我提供我的企业名称和企业域名(例如jims-business.com);当它要求我提供域名时,我停了下来.

I am under the impression that private publishing may be possible if I am an organization. So I went back to the Google Cloud Console and tried to create an organization. Here however, it seems like either I need to be subscribing to GSuite or I need to enable Cloud Identity. The latter seems only pertinent to businesses as during the sign up it asks me for my business name and business domain (e.g. jims-business.com); I stopped when it asked me for my domain.

同样,我的问题是,是否可以在我的个人帐户的多个表格之间共享Google脚本而无需公开添加?经过大量时间阅读Google术语后,我的印象不是,但很高兴能被证明是错误的!

So again, my question is, is it possible to share a Google script between multiple sheets on my personal account without making a public add-on? After way to much time reading through Google terminology my impression is no, but I'd be happy to be proven wrong!

推荐答案

您无需成为G Suite用户即可发布加载项,但是如果您希望将其作为仅限内部"使用,则可以这样做,因为它需要一个有效的域.

You don't need to be a G Suite user to publish an add-on, but you do if you want to do it as "internal only", as it requires a valid domain.

恐怕您将不得不为每个文件复制相同的脚本,并使用

I'm afraid you will have to copy the same Script for each file and use an onOpen function.

这篇关于重用脚本或发布私有的Google表格脚本插件,而无需gsuite或做生意的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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