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腳本 - 打字機效果
- 2. Google Apps引擎,Google Apps腳本和Javascript
- 3. 從Google Apps腳本
- 4. Google Apps腳本DockPanel
- 5. Google Apps腳本[createServerClickHandler]
- 6. 的iframe Google Apps腳本
- 7. 從Google Apps腳本運行python腳本
- 8. Google Apps腳本執行API
- 9. Google Apps腳本不良值
- 10. getRoot Google Apps腳本問題
- 11. VBA和Google Apps腳本
- 12. 使用Google Apps腳本
- 13. Google Apps腳本 - 集成XFrameOptions
- 14. Google Apps腳本掛起(javascript)
- 15. Parse Json - Google Apps腳本
- 16. Google Apps腳本替代ScriptProperties
- 17. Google Apps腳本getLastRow錯誤(
- 18. Google Apps腳本oAuth 2.0
- 19. Google Apps腳本查詢MariaDB
- 20. Google Apps腳本中的POST方法
- 21. Google Apps腳本中的Record_submission問題
- 22. Google Apps腳本中的CaptionPanel和TabPanel
- 23. 檢查電子郵件在Google Apps腳本中是否有效
- 24. JDBC setQueryTimeout在Google Apps腳本中返回無效參數
- 25. 在Google Apps腳本中觸發importHTML
- 26. 在Google Apps腳本中使用jsPDF
- 27. 在Android中運行Google Apps腳本
- 28. 將Google Apps腳本嵌入到iFrame中
- 29. 在Google Apps腳本中使用Javascript
- 30. Google Apps腳本getEventsForDay()返回無效的週期性事件