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

View solution in original post

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

View solution in original post

Helpful resources

Announcements
firstImage

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

firstImage

Coming Soon: T-shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

firstImage

Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Top Solution Authors
Top Kudoed Authors
Users online (6,114)