Reading corresponding value in an excel

Hi,

Need to get the correponding value to a string of 1 column by referring to the value of it adjacent column.

Can anyone help on this?

Eg.:

image

Need to get ouput as PAR while giving the input as F786

1.) Create a datatable variable DtExcel and a Dictionary (Of String, String) variable ExcelDict with default value New Dictionary(Of String, String).
2.) Use Read Range to read the data from Excel into DtExcel.
3.) Use a For Each Row loop on DtExcel, and put an Assign activity in the loop with the left-hand side set to ExcelDict(row(0).ToString), and the right-hand side set to row(1).ToString.

Now after the For Each Row loop, you can access the codes in the way you’ve indicated using ExcelDict. For instance, if you want code “F786”, you would use ExcelDict("PAR") to get it.

2 Likes

Thank you so much! :slightly_smiling_face: @Anthony_Humphries

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