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 / Delete rows in Excel a...
Power Automate
Unanswered

Delete rows in Excel and get same rows deleted in SharePoint list via Power Automate

(1) ShareShare
ReportReport
Posted on by

Hello community,

 

I have an Excel file and make changes only at this file. When I modify the excel file, I have already a corresponding SharePoint list which is successfully updated, i.e. when a row is changed or added in Excel.

 

However, I am lost about which flow I need to build for the following: Delete a row in excel and then also delete it in SharePoint list.

 

My flow so far is the following:

 

Ilona_Maz_0-1660134903505.png

 

 

In the Update Item and Create Item section, I match all the SharePoint columns to the Excel columns.

 

I hope my problem is explained clearly enough. 

 

Thank you very much for any help! 

Ilona_Maz_1-1660134902882.png

 

Categories:
I have the same question (0)
  • Slowpoke Profile Picture
    157 on at

    Hi,

    Maybe you could first "get the line" on excel that you want to delete,

    Then delete it in your Excel file, using "delete line"

    Then, you could use "sharepoint get item" with an odata filter using dynamic content from the "excel get line", to get the item with a corresponding title/id.

    And finally, use the "sharepoint delete item".

    Does it seem a good solution for you?

  • Community Power Platform Member Profile Picture
    on at

    Hi,

     

    I am not sure I really got your solution tbh. I tried to do the following but I am pretty sure there is a mistake in the least condition because I get all items deleted in the SP list. 

     

    Ilona_Maz_0-1660223331706.png

    Ilona_Maz_1-1660223340539.png

    Ilona_Maz_2-1660223359394.png

     

    Any ideas how I can test if the array values match the corresponding column values in SP?

     

    Thanks a lot for any help! 

     

    Best,

     

    Ilona

     

  • Slowpoke Profile Picture
    157 on at

    I remember that using "Column Name" eq something doesn't really work, (especially with excel connectors).

    I'd advised you to use substringof() instead (cf. OData Filter query in SharePoint Get items in Flow (sharepains.com).

     

    As well, maybe use "contains not" in the condition, so that if it's not working it won't delete anything.

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    So, I found a solution to anyone interested.

     

    Ilona_Maz_0-1660564568429.png

    Ilona_Maz_1-1660564882476.png

    Corrections from the previous sscreentshot:

    1. I removed the Filter Query in "Get items" because this way, the output was only the matching values between SP and Excel, whereas I need all the values from Excel to compare with SP and delete afterwards.

    2. I used Compose because I couldn't compare the array variable to an Excel column. I used the following function:   string(items('SPitem')?['Title']),  where SPitem is an 'apply to each' action and Title in the column with unique identifiers in SP list.

     

    Hope this helps!

     

     

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard