如果我的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')