Skip to main content

Notifications

Power Automate - Building Flows
Answered

Overwriting current Sharepoint list items with data from an Excel

Posted on by 246

Hello.  

 

I have a Sharepoint list that holds employee data and also uses an employee ID that is unique to the employee.  Every month we have a report that is run that would need to update the Sharepoint list with the information from the excel document.  

 

Can a flow be created to update the Sharepoint list based on the employee ID?  Most likely the number of rows may differ every month, would this be a problem?  Can the rows in Sharepoint that were not in the excel document be deleted or archved by moving to a new list?

 

Thank you.

  • Misa Profile Picture
    Misa 246 on at
    Re: Overwriting current Sharepoint list items with data from an Excel

    Thank you @ScottShearer and @abm  for your responses.  My apologies for the late response.   I would like to test your 2 suggestions and see what would work for the client's needs.  I havent had the time to do so.

     

    Thank you guys again!  I will mark as complete.

  • Re: Overwriting current Sharepoint list items with data from an Excel

    Hi @Misa ,

     

    As @ScottShearer  and @abm  said, your requirement could be achieved with microsoft flow.

    Have your problem been solved, or do you have any questions about how to achieve it?

    If your problem hasn't been solved, please share more details about all the column in your sharepoint and excel table and I would offer you the detail workaround.

     

    Best regards,

    Alice       

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • ScottShearer Profile Picture
    ScottShearer 25,182 on at
    Re: Overwriting current Sharepoint list items with data from an Excel

    @Misa 

    For all of your questions, the answer is yes.  My question is which of these solutions do you want to use?  The easiest thing for you to do is to delete all items prior to inserting your new data - I have provided a screen shot below that demonstrates how.

    Please post any questions you may have here.

     

    DeleteItems.jpg

  • Verified answer
    abm abm Profile Picture
    abm abm 32,250 on at
    Re: Overwriting current Sharepoint list items with data from an Excel

    Hi @Misa 

     


    Can a flow be created to update the Sharepoint list based on the employee ID?
    Yes.
    First read the excel sheet to get each rows. Not sure how you want to trigger. There are many ways you could trigger by schedule or when a file is added or modified?

    You need the 'SharePoint Get Items' flow action Filtery Query by Employee Id to get the list item id.
    Once you get the list item id you can update the 'SharePoint Update Item' flow action.

     

    Most likely the number of rows may differ every month, would this be a problem?
    No. You can read the excel sheet from a specified location whether its stored in SharePoint or Onedrive.

     

    Can the rows in Sharepoint that were not in the excel document be deleted or archved by moving to a new list?
    Yes it is possible. You can delete the list by using 'SharePoint Delete Item' by passing the item id.
    If you want to move to a new list then first read the current list using 'SharePoint - Get Item' and use the 'SharePoint Create Item' flow action to create the list in a new location. Then delete the old list item.

     

    If you need any help please let me know.

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

     

    Thanks

     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard