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 / Mirror Sharepoint List...
Power Automate
Unanswered

Mirror Sharepoint List with Excel File

(0) ShareShare
ReportReport
Posted on by 225

I have read 10's of posts on how to great a flow to update a SharePoint list based on an Excel file, but I just cant them to work or they are not suitable for me.  

 

I have therefore tried to create my flow, but struggling.  I want the flow to auto check the Excel file (Stored in Sharepoint Docs) and if a row is present in the excel file, but not in sharepoint list, then add the row, if the row is present in the excel file and sharepoint list, to update the row in the sharepoint list and if the row is in the sharepoint list, but not the excel, then remove the row from the sharepoint list.  So to summarise, the Sharepoint list should mirror the excel file.

 

I got this working with the flow clearing the sharepoint list and copying the whole excel file back into the list. Its not the most elegant and for a short period the sharepoint list is completely empty, which isnt great.  

 

How can i improve this?

Categories:
I have the same question (0)
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @StuartSmith 

     

    To achieve the update/add functionality form EXCEL to SP List , you should use  one column as key , generally in SharePoint its Id column but as you want to compare this with Excel data you have to use one(or more column).

    Steps:

    1-Get all rows from excel

    2- For each row check if key column combination matched with same column is SharePoint list 

     1) Get Items SP List with query filter (key column value<from excel>)

    3- If it exist update list item

    4- If not create new item   

     

    Let me know if this make scene?

     

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

  • StuartSmith Profile Picture
    225 on at

    Thanks for getting back to me, I am struggling with the condition...  I guess I should be comparing the "Employee_ID" row value in the excel file to the "Employee_ID" in the Sharepoint list, but the condition doesnt allow show me the sharepoint list?

     

    Sorry there was a screenshot attached, but it keeps getting removed.

    Flow1.png

     
  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @StuartSmith 

     

    It will be great if you can share a screen capture of you flow to understated it better

     

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

  • StuartSmith Profile Picture
    225 on at

    This is what I have so far...

    Flow2.png

  • DeepakS Profile Picture
    2,301 Most Valuable Professional on at

    Hi @StuartSmith 

     

    Two Solution:

     

    Option 1)To check if item exist or not in SharePoint list you need to query SP list for each row in excel (not best but you can do it quickly)

    include following in "apply to each" action:

    checkItem.png

     

    Option 2) Recommend but require more work

    ->Get SP list items (All, hope fully you wont have 5000+ items in list)

    -> Create an Array and add Employee_ID' column value to it

    -> in "Apply To each" check if Excel Employee ID exist in array (you can use filter action)

    -> if yes update list item , if no create new

     

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

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard