を変換することはできません私は、Googleのシートで指定されたカラムを通るでしょうGoogleのスクリプト:別のシートに行をコピーしようとすると、エラー
- 行で行く行機能に取り組んでいます(列Hが値として示されている[7 ])。
- 特定の値( "YES")を持つ値[7]列のセルに基づいて、行全体が選択されます。
- これで、選択された行(その全体)が同じドキュメント内の別のシートにコピーされます。
master.getRange(value,1, 1, colWidth).copyTo(destinationYesesRange);
エラー状態:
Cannot convert [here the Logger error provides a list of all values in a row separated by a comma] to (class).
function moveRowsBasedOnCellValue(){ var ss = SpreadsheetApp.getActiveSpreadsheet(); var sheet = ss.getActiveSheet(); var master = ss.getSheetByName('Main'); var values = master.getDataRange().getValues(); //selects all values in a sheet values.forEach(function(value){ //if cell in the column H equals YES execute the script if (value[7] == "YES"){ //variable to select all columns in the source sheet that aren't blank var colWidth = master.getMaxColumns(); //variable containing the target sheet var destinationYeses = ss.getSheetByName("Yeses"); //select first empty row in the destination sheet var destinationYesesRange = destinationYeses.getRange(destinationYeses.getLastRow()+1,1); //copy the relevant row into the sheet master.getRange(value,1, 1, colWidth).copyTo(destinationYesesRange); }}); }
スクリプトは、スクリプトの最後の行まで罰金実行:
このは、私がこれまで持っているものです
私は何が間違っているかもしれないと思っていますか?