web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Compare xlsx file and ...
Power Automate
Unanswered

Compare xlsx file and show only changes row

(0) ShareShare
ReportReport
Posted on by 8

Hi All,

 

I want to compare 2 excel file

 

Master File

Last Save File

 

I want to compare the Master file with the Last save file If the Master File has the same row values as the Last save file then delete if any cell has a different value and keep the row

 

 

I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @gary07 

     

    Just to clarify, 

     

    if the row in master file and local file are same, then delete the row in master file 

    if the row in master file and local file are different, then keep that row in master file 

     

    right ?

     

    May be a screenshot of how input and output data should look like would also helps !

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • gary07 Profile Picture
    8 on at

    Hi

     

    Thank you for your email

     

    I want if the row in master file and local file are different, then keep that row in master file 

  • Nived_Nambiar Profile Picture
    18,138 Super User 2026 Season 1 on at

    Hi @gary07 

     

    Ok got it. Let me explain with a demo files and a flow to let you know how to design this process

     

    Assume this master excel file :

    Nived_Nambiar_0-1702742621886.png

     

    Assume this is local file:

    Nived_Nambiar_1-1702742639187.png

     

    Now as you know 1st row of both are same, so we need to remove that row from the master file.  

    Let's see how we can design the flow 🙂

     

    Step1: read the excel master and local file using excel actions like below:

    Nived_Nambiar_2-1702742715546.png

     

    Here MasterDt is master file data and LocalDt is local file data

     

    2. Now use loop action to loop number of times (here master row count = local row count)

    Nived_Nambiar_3-1702742776363.png

     

    Loop settings should be like below:

    Nived_Nambiar_4-1702742795882.png

     

    Within the loop try these sub-steps:

    a.  set a variable strMaster with concatenating all column values of that row using comma as delimiter like below:

    Nived_Nambiar_5-1702742851829.png

     

    here expression %MasterDt[index][0]% represent current row first column 

     

    Simmilarly do the same for local file data as well:

    Nived_Nambiar_6-1702742903130.png

     

    Nived_Nambiar_7-1702742917786.png

     

    b. use if condition to check if both variables are equal:

    Nived_Nambiar_8-1702742948464.png

    if condition is true use delete row action to delete the row like below:

    Nived_Nambiar_9-1702742996715.png

     

    exiting out of loop, use close excel to close the master file excel instance 

    Nived_Nambiar_10-1702743029488.png

     

     

    Overall flow looks like this:

    Nived_Nambiar_11-1702743049098.png

     

    Nived_Nambiar_12-1702743060421.png

     

     

    Hope it helps !

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    What you've suggested there is quite great, except you forgot one thing - they should either exit the loop after deleting the row (assuming only one match is to be found), or decrease the value of the index by 1 and continue (assuming more than one match is to be found). Otherwise they'd be deleting wrong rows after the first deletion.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • gary07 Profile Picture
    8 on at

    Hi Nived,

     

    Not able to add the condition I have email you

  • gary07 Profile Picture
    8 on at

    any one can helep me

  • gary07 Profile Picture
    8 on at

    Hi

     

    I have tried but it did not work

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 389

#2
Vish WR Profile Picture

Vish WR 331

#3
David_MA Profile Picture

David_MA 298 Super User 2026 Season 1

Last 30 days Overall leaderboard