google-apps-script - 我可以将 Google 表格单元格下载为 JS 文件吗?
问题描述
如果我的 Google 工作表如下所示:
A B C D
1 Template {content} document.write('{content}')
2
3 Name Value Output Button
4 Test A test =SUBSTITUTE(c$1, b$1, B4) [A button with a custom function...]
5 Dummy Just a dummy =SUBSTITUTE(c$1, b$1, B5) [A button with a custom function...]
6 Foo Foo this =SUBSTITUTE(c$1, b$1, B6) [A button with a custom function...]
7 Bar Bar that =SUBSTITUTE(c$1, b$1, B7) [A button with a custom function...]
我可以使用自定义函数让每个按钮将其相关单元格下载为 JS 文件吗?例如,点击 D4 应该将 C4 保存为 {A4}.js(即 Test.js),这样 Test.js 将包含:
document.write('A test')
解决方案
推荐阅读
- python-2.7 - 从 python 脚本创建和暂存数据流模板
- java - 如何将 .p12 或 pem 证书导入 java 密钥库?
- angular - fullcalendar v4 外部丢弃事件
- php - Symfony - 将实体设置为多对一
- r - R Shiny - Highcharts:显示前的工具提示延迟
- python - 在 django 中将 UserFilter 导入为 urls.py
- c# - ASP.NET Core 中的单元测试密码验证器
- json - Angular6 JSON - 元素“......未定义”
- regex - 正则表达式匹配不同的分隔符
- python-3.x - 从特定父母那里获取标签属性