I posted this question of Stack Overflow but didn't find a solution.
I am trying to add a blank row where a sequential value is missing.
The following code works perfectly when the numbers are missing WITHIN the sequence (for example 0,1,2, ,4,5).
But if either the first value (eg. 0) or last value (eg. 5) is missing, a blank row will not be added.