deleteRowsByConditional
Every row is judged against the sheet as it was read, and the deletions then happen from the bottom upwards in consecutive blocks. That is what keeps a hand-written loop from deleting the wrong rows once the positions start shifting.
Rows are gone for good: clearRowsByConditional is the one that only empties them.
A sheet means its whole data range and whole rows are removed. A range means only the cells inside it: they are deleted and the ones below them move up, while the columns beside the range stay exactly where they are. Either way the predicate is given the position on the sheet, and the refusal to empty a sheet applies to the sheet form, where a sheet must keep a row.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| The sheet to work on, or the range to work within: only its cells are read, and only they are removed. |
|
| Receives the row's cells, its one-based position and — when |
|
|
|
Returns
number — how many were affected.
Throws
Exception | Condition |
|---|---|
| the first argument is neither a sheet nor a range. |
| the predicate is not a function, or the header position is not a positive integer. |
Examples
In use
Within one block
See also
Source
This documentation was generated with AI (Claude) from the library's source code.