使用 Google Apps 脚本在 Google 工作表中侧边栏宽度未发生变化
function onOpen()
{
var html = HtmlService.createHtmlOutputFromFile('side').setTitle('Custom sidebar').setWidth(150);
SpreadsheetApp.getUi().showSidebar(html);
}
这是工作表,代码位于该工作表的“工具”>脚本编辑器中。 https://docs.google.com/spreadsheets/d/1hCOU5mUQxaXRz6JTyO6IZphVkfiii1RS5OsLhMJWFNY/edit?usp=sharing
最佳答案
在 Google 文档和表单中,侧边栏现在忽略 setWidth() 方法;它们无法更改默认宽度 300px。此更改已应用于上周发布的新版表格。
https://developers.google.com/apps-script/releases/#february_2014
关于javascript - 使用 Google Apps 脚本在 Google 表格中侧边栏宽度未发生变化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43325089/