You are correct, that the selection()
method in this scenario would return only the top-left pasted cell. In order to cover the case with pasting multiple cells, I would suggest you to implement a handler for the change
changedRange = e.range;
and alter the paste
handler implementation to:
Here you will find a modified version of the Dojo
, which implements the above suggestion.