Google Script: Conditionally copy rows from one spreadsheet to another

前端 未结 3 1933
死守一世寂寞
死守一世寂寞 2021-01-14 21:17

I\'ve found the basic solution https://stackoverflow.com/a/4809413/1438650 but it lacks both the conditional and non-contiguous aspects of my project. I need the the copy to

3条回答
  •  [愿得一人]
    2021-01-14 21:22

    Here are some tips for you:

    • Get a range that includes the entire row, and then call getValues() to get all the values at once, instead of one at a time like you are doing now.
    • Wrap an if() statement around your appendRow() call, using the condition you want to test for.
    • It's OK to have you appendRow(), since there is no method to append multiple rows at once.

提交回复
热议问题