![](/img/trans.png)
[英]How to inset automatic data in Cells using app script in google sheet?
[英]calculate cells in app script to using in google sheet
我有這個 function 並且運行良好:
function total(x,y)
return x + y;
}
在谷歌工作表中,我添加了任何單元格=total(A1,B1)
並給我結果。
我想通過這段代碼來計算很多單元格:
function total(x)
return x;
}
在谷歌表中,我添加了任何單元格=total(A1:A100)
並給我錯誤。 對那個問題的任何幫助。
function myTotal(a) {
let r = a.flat().filter(e => e && !isNaN(e));
if(r && r.length ) {
return r.reduce((a, c) => a += Number(c));
} else {
return '';
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.