google-apps-script - 在脚本中使用 importhtml 函数时出错
问题描述
我正在尝试importhtml()
在脚本中使用 google sheet 函数来传递编码的查询参数。
function recode(query) {
const value = encodeURIComponent(query).replace('%20','+');
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A3').activate();
spreadsheet.getCurrentCell().setFormula('=importhtml("xxx.com/?query='+value+'","table",1)');
}
我收到一个错误“例外:您无权调用 setFormula(第 5 行)。”
解决方案
推荐阅读
- amazon-web-services - 将 WebACL 应用到 API 网关
- css - 如何在 vuetify 中删除文本区域底部边距?
- database - Delphi MySQL 字段验证
- python - A-star 算法导致奇怪、缓慢和低效的选择
- excel - 对工作表上的所有表进行排序
- rest - SharePoint Online 休息 API 限制
- java - 如何在 Java 中重写 ModelAndView 的集成测试
- spring-boot - spring boot 从 2.1.3 升级到 2.2.6 后 spring boot 测试创建 MongoHealthContributorAutoConfiguration bean 失败
- selenium - 如何在 python 中使用 selenium 在 instagram 中获取关注者列表?
- python - matplotlib中非均匀(非线性)x轴的Python实现