For Each Row on Spreadsheet

I think this is relatively straight forward, but I have an excel spreadsheet that has results for what I need down ten rows. The columns along the top have different criteria in them and go along like A1, B1, C1 etc. I basically need to run a for each row on this spreadsheet and say that every row which has a certain column with x as the answer be put into datatable A, and everyone else into datatable B. What would be the code for the for each row and what would be in the body?

@jackcawthra I guess Basically you’re Filtering the Datatable so in that case you can use Filter Datatable or if you want to use For each and work on it you can achieve it in that way also :sweat_smile:

Yeah I want to use a for each as it will benefit the future work I do. How would I do so?

@jackcawthra ok, In that case, You need to Create two Datatable A and Datatable B in the format you want them to be using Build Datatable, then use :

  1. For Each Row
    Inside body of For Each use an if Activity and provide the condition row(“columnName”).toString=“yourValue”
    if true inside true block use Add Data row Activity where you can mention Datatable Name and Datarow value
    Use Add Data row with Different Datatable Name

Hope you can understand :sweat_smile: