Matching name in excel column and writing value on the same row in another specified column

image

Hi, I have a problem whereby i extract data from email, and I want to write the data in excel. So for example, I extract the email with data showing China as the name, and its value of maybe 100. Then I save the variables China as the name on UIPath and its value as another variable. I wish to write these values on a main excel sheet. So I need to match China as row 3 in the excel sheet first, and then input the corresponding value beside it. Anyone knows how I can go about doing this?

@shanen

  1. use Read Range activity to read data from Excel and will give you output as dataTable.
  2. Then use For Each Row activity to itreate that dataTable.
    ForEach row in dataTableName
    Int Index =
    dataTableName.rows.indexOf(row)+2
    If
    row(“ColumnName”).Tostring.equals(“China”)
    Then use Write Cell activity and specify below:

Range: “B”+index.Tostring
Value: “100”

Etc…

1 Like

Hi buddy @shanen
Its resolved
here you go with a xaml
besidecol.zip (2.5 KB)

Hope this would help you
Cheers

2 Likes

Thank you! I think this works

Thanks! this is a great help!