How could I find out, which column holds the title “email” in the first row and then, when iterating through the rows, always refer to the right column?
HI,
Could you share how the output of your excel module looks like and how your Scenario is build currently?
A Solution that might work depending on the Setup of your export and Scenario.:
Only get the first Row from your spreadsheet.
Set a Variable that determines per Functions in what cell “email” is written. Logic example "If A1 Contains “email” return “A”; If B1 contains “email” return “B” …
Then you get the actual range from your spreadsheet that you need and use the Variable you have set to know in wich Collum the emails are.
When mapping values, instead of hardcoding column positions, use:
{{get(4.values; indexOf(1.values; "email"))}}
This finds where “email” is in your header row, then pulls that same position from each data row.
So whether email moves to column 2 or column 8 in the next export, it’ll always grab the correct value by matching the header name instead of column position.
I finally found the solution myself. I create an array of all column headings (field names) with the corresponding column identifier (A…AZ). When accessing data in excel afterwards, I can get the correct cell by naming the header and the function uses the correct column identifier.