发布插件
Google Workspace Marketplace SDK
- 应用程序配置
部署 ID:
Sheets 插件项目脚本 ID:
Sheets 插件脚本版本: - 商品详情
发布
代码.gs
// Can’t call SpreadsheetApp.getUi()
// as a Global when the add-on is installed but not enabled.
// SpreadsheetApp is initialized when it is called in a function
var ui = function(){
return SpreadsheetApp.getUi()}
function onOpen() {
ui()
.createAddonMenu()
.addItem('Prepare sheet...', 'prepareSheet_')
.addItem('Generate step-by-step...', 'generateStepByStep_')
.addToUi();
}
/**
* A function that adds headers and some initial data to the spreadsheet.
*/
function prepareSheet_() {}
/**
* Creates a new sheet containing step-by-step directions between the two
* addresses on the "Settings" sheet that the user selected.
*/
function generateStepByStep_() {}