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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Populating Excel Table...
Power Automate
Answered

Populating Excel Table with New Data from CSV -- Help

(0) ShareShare
ReportReport
Posted on by 40

I have an excel sheet with a table that holds data. I have a query that runs every day that populates a CSV file with updated data. The table and CSV file are the same, with the exception of new rows on the CSV file representing new entries. How can I compare the CSV file and Excel table and only add the new rows to the excel table?

 

The only way I could figure out was to wipe the entire excel table and repopulate the data daily, but that is not efficient. Attached are screenshots of the current flow. Thanks!

Screen Shot 2023-09-24 at 6.12.08 PM.png
Screen Shot 2023-09-24 at 6.18.27 PM.png
Screen Shot 2023-09-24 at 6.11.54 PM.png
Categories:
I have the same question (0)
  • Verified answer
    takolota1 Profile Picture
    4,978 Moderator on at

    You can use a Select to get all the unique primary key values from the Excel table. You will need to insert the Excel values output into the From input, switch the right-side Map toggle to a single input, & insert in that single Map input something like

    item()?['InsertPrimaryKeyColumnName']

    Then follow that with a Filter array on the JSON of the CSV data, use in the condition…

    Select Body Output does not contain CSV unique primary key value, like

    item()?['InsertCSVPrimarKeyColumnName']

     

    That will filter everything down to the rows in the CSV not found in the Excel table so you can then add them to the Excel table.

  • powerappspro1 Profile Picture
    40 on at

    I understand that would be the solution in theory, but whenever I try to do that I end up with endless "Apply to each" loops that do not return the desired output. I'm not sure how to structure those kind of select and filter functions given the "apply to each" loops. 

  • powerappspro1 Profile Picture
    40 on at

    nevermind - figured it out

  • jrod82 Profile Picture
    8 on at

    How did you end up solving this? I am having similar issues and am stuck in hell it seems lol

     

    https://powerusers.microsoft.com/t5/Building-Flows/Flow-to-download-csv-attachment-to-OneDrive-and-process-data-to/m-p/2800807#M314666

  • takolota1 Profile Picture
    4,978 Moderator on at

    @jrod82 

    I updated the solution post to provide more details

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 273 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 135 Most Valuable Professional

Last 30 days Overall leaderboard