How to iterate over a range of cells in a Google Sheet

:bullseye: What is your goal?

How can i iterate over a range of cells in a Google Sheet?

:thinking: What is the problem & what have you tried?

I am building an automation that goes through data in a spreadsheet, use the cells available and then generate a Google document. There can be multiple spreadsheets so i use an iterator to go through them one by one

I am struggling to find a way to do this

  1. The spreadsheet (source data) has a specific range which i want to iterate over. The range has fixed # of columns but can have different # of rows across the various spreadsheets.
  2. For this specific range within each spreadsheet, i want to run a sub-iterator (while already within an iterator which runs across the spreadsheets) that goes through each row for the downstream modules.

I think the essence is that how do i load this “dynamic range” of cells as an Array, and then be able to run an iterator across each row in the range. I am not sure how to implement this. If you look at the screenshot attached - there can be 2 spreadsheets and the specific range that i want to iterate over can have different # of rows (while # of columns are same). While i have figured out how to iterate across the # of spreadsheets, i am struggling on how to iterate over this range within each Spreadsheet. Would appreciate some guidance!

:camera_with_flash: Screenshots (scenario flow, module settings, errors)