是否可以通过添加链接到脚本/宏的自定义图标来自定义 Google 电子表格/表格的工具栏?我只见过定制的电子表格菜单。
最佳答案
目前这是不可能的。 the Spreadsheet
object 上的当前方法集不包括任何访问工具栏或添加新工具栏的工具。
您只能添加菜单、侧边栏或定义自定义功能。
我自己习惯于使用菜单项来切换侧边栏,很多在 the way described here 中。 :
function onOpen() {
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.createMenu('Custom Menu')
.addItem('Show sidebar', 'showSidebar')
.addToUi();
}
function showSidebar() {
var html = HtmlService.createHtmlOutputFromFile('Page')
.setTitle('My custom sidebar')
.setWidth(300);
SpreadsheetApp.getUi() // Or DocumentApp or FormApp.
.showSidebar(html);
}
关于google-apps-script - 自定义 Google 电子表格/表格工具栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22376101/