Skip to main content
Community site session details

Community site session details

Session Id : nHWc7ioQgtr56IiKx0W216
Power Automate - General Discussion
Answered

Deleting the excel file in sharepoint after the data extracted to database

Like (0) ShareShare
ReportReport
Posted on 1 Apr 2022 04:13:02 by

Hi,

I want to know whether is it possible to delete the excel file that saving in share point on daily basis soon after the data are extracted to database.

This is for security purpose of the data, so that the data will no longer exist in Share Point.

 

If this is possible, please suggest me the way of doing it.

 

Thank you.

  • Community Power Platform Member Profile Picture
    on 01 Apr 2022 at 04:50:22
    Re: Deleting the excel file in sharepoint after the data extracted to database

    Thank you so much. I'll try in this way

  • Verified answer
    Rhiassuring Profile Picture
    8,688 Moderator on 01 Apr 2022 at 04:43:16
    Re: Deleting the excel file in sharepoint after the data extracted to database

    Ah, yes, I see. So we want to delete the rows of data you've created FROM the sheet, out of SharePoint. If it's alright with you for it to end up in the Recycle Bin (yourself and site owners would be able to see it), you could just loop through the same data after and delete the items. I'm guessing the list you're using will ONLY contain this data, and then will be cleared daily as well - is this correct? You could just do a "Get items" on the list, get them all, then loop through and Delete Items.

    You can also skip the Recycle Bin entirely using this method:

    https://michelcarlo.com/2021/10/09/permanently-delete-sharepoint-list-items-using-power-automate-skip-the-recycle-bin/

    Cheers,


    Rhia

  • Community Power Platform Member Profile Picture
    on 01 Apr 2022 at 04:33:11
    Re: Deleting the excel file in sharepoint after the data extracted to database

    Hi,

    I'm still creating the trigger. The data in a excel sheet is daily being sending to a specific mail. And I'm planning to do is, get the data in the excel sheet through power automate and save it in a share point and extract the data to Azure database. And from the database get the data to power BI to report. 

    Once the data is transferred to the database, I want to delete those data in the Share Point as the data are confidential.

     

    Hope you got clear.

    Thank you

  • Rhiassuring Profile Picture
    8,688 Moderator on 01 Apr 2022 at 04:19:21
    Re: Deleting the excel file in sharepoint after the data extracted to database

    Hi there, 

    Yes, it is possible - but - it depends on what you'd need to trigger it. You've let us know that the data is being extracted to another database - how is that currently being done? If it's via a Power Automate flow, well, that's great - it'll be easy! If it's done through a script or something else, then you may need to find a time that will work daily, or something similar. 

    Cheers,


    Rhia

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete