1
A
回答
2
当Apps脚本访问某些单元格为空的范围内的值时,空单元格的内容由空字符串''
表示,而不是由null
值表示。你可以这样
function zeroIfNull(a) {
return a === '' ? 0 : a;
}
以0代替这些,或者,如果你想一定范围内多于一个小区内做到这一点,
function zeroIfNull(array) {
return array.map(function(row) {
return row.map(function(element) {
return element === '' ? 0 : element;
});
});
}
相关问题
- 1. Google Apps脚本中的STDOUT等效于什么?
- 2. Google Apps脚本中的Highcharts
- 3. Google Apps脚本 - 打字机效果
- 4. 无效日期Google Apps脚本
- 5. Google Apps引擎,Google Apps脚本和Javascript
- 6. Google Apps脚本CoffeeScript
- 7. Google Apps脚本DockPanel
- 8. Google Apps脚本[createServerClickHandler]
- 9. 从Google Apps脚本
- 10. Google Site Apps脚本
- 11. 的iframe Google Apps脚本
- 12. 访问Google文档中的Google Apps脚本脚本
- 13. 从Google Apps脚本运行python脚本
- 14. doPost两次Google Apps脚本?
- 15. Google Apps脚本挂起(javascript)
- 16. 发布Google Apps脚本库
- 17. Google Apps脚本指导
- 18. Google Apps脚本getLastRow错误(
- 19. 使用Google Apps脚本
- 20. Python/Google Apps脚本集成
- 21. Google Apps脚本 - 集成XFrameOptions
- 22. Google Apps脚本关闭()
- 23. Google Apps脚本失败
- 24. Parse Json - Google Apps脚本
- 25. Google Apps脚本FTP上传
- 26. Google Apps脚本触发器
- 27. 删除google-apps脚本
- 28. Google Apps脚本执行API
- 29. Google Apps脚本授权
- 30. Google Apps脚本不良值