I need to get the row number and the content for the deleted row in onEdit trigger script. or is there an onDelete function?
Basically, when user deletes one row or a range of rows, the script should be notified the range deleted, in some way.
If user deletes one cell this works:
function onEdit(e) {
if (e.value==e.source.getActiveSheet().getActiveCell().getValue()) {
//Things to do for normal edition
} else {
//Things to do if cell was deleted
deleted_range = e.range
}
}
I'm not shure if that's the right solution but works fine until now. For multiple cells i can't find a solution yet :/
This is not possible. There's a feature request opened regarding this, you may want to star it to keep track of updates and kind of vote for it.
Issue 1363: Add trigger for spreadsheet column or row operations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With