cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Yacob_hard
Level: Powered On

Delete rows from a Excel sheet where the date is not current

Hi All,

 

I'm working with a flow on a recurrence basis, the flow should;

 

1. Grab the file from the sharepoint drive

2. Attach the file to an email to be sent out

3. After the email has been sent, the excel spreadsheet should have all rows with dates older the present date removed

 

I've managed the getting and emailing of the file, however a bit stumped when looking at how to only remove the rows that have been added if the dates don't match up.

 

Here's what i'm working with now, any advice would be greatly appreciated!

 

The spreadsheet where i want to remove all data other than the headers;

Email stats example.png

 

Following the Emailing of the file;

 

List rows.pngdelete rows.pngformatDateTime(utcNow(), 'YYYY-MM-DD')

 

Hope this makes sense!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Delete rows from a Excel sheet where the date is not current

Hi @ Yacob_hard,

 

 

I have made a test on my side,please enter expression in the Condition as below:

@not(equals(formatDateTime(items('Apply_to_each')?['Date & Time'], 'yyyy-MM-dd'), formatDateTime(utcNow(), 'yyyy-MM-dd')))

The screenshot of my flow as below:

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

Regards,
Alice Zhang

1 REPLY 1
Community Support Team
Community Support Team

Re: Delete rows from a Excel sheet where the date is not current

Hi @ Yacob_hard,

 

 

I have made a test on my side,please enter expression in the Condition as below:

@not(equals(formatDateTime(items('Apply_to_each')?['Date & Time'], 'yyyy-MM-dd'), formatDateTime(utcNow(), 'yyyy-MM-dd')))

The screenshot of my flow as below:

Capture.PNG

 

The flow would run successfully as below:

Capture.PNG

 

Please let me know if your problem could be solved.

 

Regards,
Alice Zhang

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 42 members 4,961 guests
Recent signins:
Please welcome our newest community members: