How to iterate columns of a Google Sheet worksheet

Modified on Wed, 29 May at 2:31 PM

In some cases it is beneficial to iterate a row's columns, i.e. to convert each cell in a row into an individual bundle. If you hover over items in the Google Sheets > Search Rows module's output, you can notice that the raw names of items are in fact zero based indexes:

Google_Sheets___Search_Rows_output_.png

Using the Repeater module to cycle from 0 to the number of columns minus 1 followed by a module employing the get(bundle;3. i) formula seems like a straightforward solution:

Repeater_.png

The only obstacle is that the first parameter of the get() function should be the whole bundle, which is currently not available in the mapping panel. Nevertheless, you can use the Array aggregator module to push the bundle into a single item array (by exploiting its grouping feature) to which the get() function can be applied:

Array_aggregator_.png

Here is the complete scenario:

Scenario_.png

The formula in the last module contains two nested get() functions. The inner function gets the whole bundle (first item in the single item array), the outer one returns the i-th column from the row.

get(get(4. Array;1);3. i)

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article