How to read each column of each row with conditions?

Hi there,
I have an Excel file and I want to retrieve the Header Text if its value is “Y”

Here is a snippet of my workflow

OUTPUT: Returns all the headers

WANTED BEHAVIOR: Return only the Headers that have for value an “Y”

Here is a snippet of my Excel file

inside the for each (when looping the columns) you can insert an if Activity

COndition: row(item.ColumnName).toString().Trim().Equals(“Y”)
Then : log message - item.ColumnName

so it will loop over all rows, then over all cols and checks for the Y

Give a try

I tried but it is throwing this error:

check for the . (dot) before Equals

New error check my previous image I updated it

Ensure that the typeargument of the for each is set to DataColumn

1 Like

Thank you wherry much man, you just helped me go thought a really taught obstacle, RESPECT

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.