Compare excel sheets

Hello! I am having some struggles and I will try to explain you why: I am doing a project where I need to scrap some data from a website to excel (just a column with codes like “F91243”), and inside this excel I have 2 sheets. In sheet one I have all the codes that I already analyse in my project, and in sheet 2 I have those codes that I scrapped. So I need to compare this 2 sheets and I need to use an if, because IF the code in sheet 2 doesn’t exist in sheet 1, my program download some files, and after the download this code has to go to sheet 1, BUT IF the code in sheet 2 exists in sheet one, this code has to be deleted and my program continues analyzing the next code. Can you please help me?

Hi Andre!

Sorry i didn’t create variables.

First of all build a dt


You have the scraped dt, put that in a for each row.

You have sheet1 dt too, Use filter data table like “Code” = row(“Code”).toString

You will have a dt which has rows(the code exist in sheet1) or 0 row. Use an if, like above.

With add data row you will add those values to built_dt. Then you can append to sheet 1;


Hope these helps!

Ercan, how are you? Thank you for your answer, I really need some help. I did what you said, but I don’t understand what you said about “Use filter data table like “Code” = row(“Code”).toString”… Beside that, all this functions are inside an excel appliation scope, so I think I can’t use another excel application scope in the end.
I wiil send you my process, if you can check where are my errors I would really appreciate.

Sequência.xaml (42.6 KB)

Why are you using whole flow in an excel scope?


Use scopes like this. Read inside of it. Then use datatable below of workflow.

Inside of your xaml there are duplicated variables;


in add data row activity arrayrow input is empty

Your workflow has to be as simple as possible.

I made a simple logic here. Please try it to adapt yours. If you have any question you can ask by the way.

Main.xaml (11.4 KB)

1 Like

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