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 / Merging Monthly Excel ...
Power Automate
Answered

Merging Monthly Excel Data into a Master File Without Duplicates

(1) ShareShare
ReportReport
Posted on by 2

Problem Description

You have two Excel files:

  1. Monthly Excel File – This file contains data collected every month.
  2. Master File – This file serves as a consolidated record but initially contains only column headers matching those in the monthly file.
     

    Objective:

    We need to append data from the monthly file to the master file while ensuring that duplicate rows are not added. A row is considered duplicate if it already exists in the master file.

    Requirements:

  3. Read the monthly data from the Excel file.
  4. Compare each row with existing rows in the master file.
  5. Append only unique rows to the master file.
  6. Save the updated master file with the new unique data.
Categories:
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,969 Moderator on at
    Hi,
     
    So, is the ask for us to build it? I am not sure what the ask is, but we don't just build peoples stuff generally, we are free volunteers not paid consultants.
     
    With no offense meant, people are just doing what you are doing, putting requirements in like we get paid. please don't disrespect our time like that. You literally have no questions, no work done, nothing.
     
    Here are some thoughts to be generous
     
    1. Put your files in SharePoint or OneDrive
    2. Create a new Automated Flow
    --That triggers when a file is updated or created. This way you can put the Monthly file in the same place and it will trigger the flow
     
    3. Make sure that your Master Excel and the Incoming monthly have a Table defined around the data
    Or
    You will need to use the Create Table action to add a Table to the Incoming file each time. The master file should be easy as you only have one of those so just make sure its there before you save it.
     
    4. Use the List rows in a Table action to retrieve all the rows in the monthly file
     
    5. add an apply to each to loop through the Output from step 4, where it will return an array of data rows, or it will return a blank/empty array
     
    6. inside the Apply to each
    --Do a List Rows in a Table, against the Master, but use a Filter, leveraging the ODATA Filter, to try to see if an existing row already exists or not
    ----Add a Condition
    ------In the condition on the left use the length expression to check the length of the Dynamic values or body/value output from your List Rows against the master file. 
    -------in the single use is equal to
    -------on the right say 1
     
    This will tell you IF you found a row or not.
    In the Yes Side, meaning you found a row, you can now do an update to it with the data from the Outer List rows against the monthly file
    or
    In the No side (it didn't find out), do an Add a row into a table action for Excel and pass in the data (again) from the Out List Rows against the monthly file
     
    And done
     
    Thats it.
     
    Please go try to build that then please come back if you have further questions.
     
  • Suggested answer
    NO-04030654-0 Profile Picture
    2 on at

    Thank you so much, sir!

    After reviewing the output code for each action, I was able to identify the issue. The error occurred while mapping columns in the "Add to Row" action. Specifically, special characters such as dots ( . ) must be represented using their hexadecimal equivalents.

    For example:

    • Column Name: Inv.prog
    • Correct Mapping: items('Apply_to_each')?['Inv_x002e_prog']

    By applying this approach, the error was resolved successfully.

    Thanks again for your help!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard