Extract Data from one excel to another with condition

Hello ,

I need to automate a robot to check in row Language and if cell color is yellow write color value like in example file “German” in another excel file row and write corresponding country in another row. So it will be If color is yellow write “German” in another excel file row and write “Germany” in another excel file row

Excel1 is sample file
Excel2 is sample file where data should be written.

If anybody have suggestion how I can approach this will be great.

Thank you.
Excel 1.xlsx (9.7 KB)
Excel 2.xlsx (8.4 KB)

Hi @Shwapx ! Welcome back to the UiPath Community :grinning_face_with_smiling_eyes:
Sure, here is a suggestion: Color_and_text.xaml (11.4 KB)

Let us know if it does not work as expected :grin:

1 Like

Hello ,

Thank you so much it’s working , but want to ask you something else how I can add additional text in front of the Country in my output DT. Like Sampletext + Country “Test Germany”. I have tried with the + txt in front of row"Country" , but I got error.

Great to hear that !
To add additional text, you can by editing the content of “Add datarow” activity. Put the text between two quotation marks (" my text "), and if you prefer using a variable instead, check that the variable is of string type:

Thank you for the help , one last question how did you make that the robot to know to fill the data row in those 2 fields in our data output I was struggling to make that part. We have Read Range which is starting to read from F3 to H3 and we have F3 and H3 as headers right , but in write range is starting to writing from F4 how robot know that need to write on H4 as well and how know that country need to be in country field and language in language is it because we are firstly adding country in add data row activity and then language ?

Best regards

Hi @Shwapx !
The robot started to write in F4 because I asked him to do so at the end of the code:
image
Also, the reason why the robot is writing at F and H column only is because:
1- I took the headers at the read range; the headers were only 3
2- Then when I filled the datatable, I precised what I wanted :
First cell = F, 2nd cell = G, 3rd cell = H

1 Like

Hello @Hiba_B ,

Thank you for that explanation and wish you nice rest of the week.

Best regards

1 Like

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