The following helper function gets a single cell range as first parameter, and an integer as the second:
function identacaoGrupos(rng: object, numeroGrupos:number) {
let arr =[rng];
for(let i = 0; i<numeroGrupos; i++){
arr.push(arr[i].getExtendedRange(ExcelScript.KeyboardDirection.down).getLastCell());
};
}
I need to start on a given cell (eg: B3) and get an array with the cells below it which are not empty.
For example:
Calling this function with the B3 cell as the 1st argument, and 4 as the second, should return the array arr
with the cells B3, B7, B11 and B20.
But it is returning the error: "Property getExtendedRange does not exist on type 'object'"
Any help?
rng
data type toRange
identacaoGrupos
return an array ofRange
object