在Google表格中通过删除线识别单元格

时间:2018-07-16 04:58:14

标签: function google-apps-script google-sheets strikethrough

我正在尝试在Google工作表上计算某些内容((((带删除线的单元格)/(列中的单元格总数))* 100),这是Google脚本编辑器的新手。 脚本1:

Parameter "secure:teamcity.password.9423623da-3519-4052-8c78-3334c9fe58dd.sonar.jdbc.password" is undefined.
Parameter "secure:teamcity.password.9423625da-3519-4052-8c78-3334c9fe58dd.sonarPassword" is undefined.


Property 'sonar.jdbc.url' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
Property 'sonar.jdbc.username' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.
Property 'sonar.jdbc.password' is not supported any more. It will be ignored. There is no longer any DB connection to the SQ database.

脚本1错误:

  

“找不到范围。(第9行)”

脚本2:

function countStrike(range) {
var count = 0;
    SpreadsheetApp.getActiveSheet()
        .getRange(range)
        .getFontLines()
    .reduce(function (a, b) {
        return a.concat(b);
    })
    .forEach(function (el) {
        if (el === "line-through") {
            count++
        }
    });
return count;}

脚本2错误:

  

“缺少形式参数。(第1行)”

0 个答案:

没有答案