Skip to main content
Navigator | Tier 3
November 25, 2024

Deleting excel row with date

  • November 25, 2024
  • 13 replies
  • 201 views

how to delete rows with the date in excel

Actually I am in progress of deleting past 7 days record in excel sheet with date may i know how to get the date and delete past 7 days in automation anywhere when i try to delete without loop it just delete 1 record when with in the loop it just delete all the record

Kindly give me a flow

Pinned Reply By Zaid Chougle

@abishek22225 ,

First → Use loop (For each row in excel advanced)

Second → Get System Date time, then subtract it by 7 Days. 

Third→ Use If condition( check variable date == subtracted date), delete row.

Fourth → Use if condition (check previous row date == subtracted date), delete row.

Fifth → Assign Current Row to a variable, example (Previous_Row).

 

13 replies

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
November 26, 2024

how to delete rows with the date in excel

Actually I am in progress of deleting past 7 days record in excel sheet with date may i know how to get the date and delete past 7 days in automation anywhere when i try to delete without loop it just delete 1 record when with in the loop it just delete all the record

Kindly give me a flow

Hi ​@abishek22225 , you can use Get Current Date, Subtract Days -7 then compare with the date present in the excel, if match is found then delete the row. 

 
Lets Automate !
Navigator | Tier 3
November 26, 2024

Thanks for the reply when i have done this all that you said but i have a problem in when it delete the 5 row the 6 row place it in 5 row so it was not deleting the row properly what should i do now

kindly help me in this

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
November 27, 2024

You can save the previous row data in a variable and once you delete and go to the next iteration, you can initially check for the previous row data and then the current row. This will work for the row getting shifted up.

 
Lets Automate !
Navigator | Tier 3
November 27, 2024

@Zaid Chougle Thank you sir , Actually I am new to Automation Anywhere kindly tell me the flow and how it works in detail 

 

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
November 27, 2024

Sure ​@abishek22225,

Initially there will be a loop for each row in excel → At the end of the loop please save the entire row / date in a variable. In the next iteration it will check for current row and previous row as well(this is for the row getting shifted up post deletion). 

Check the logic it will work.

Lets Automate !
Navigator | Tier 3
November 27, 2024

Ok Sir Thank you

Navigator | Tier 3
November 27, 2024

@Zaid Chougle sir it showing error in the loop kindly help me to solve it

 

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
November 27, 2024

@abishek22225 , can you please share the Screenshot of the logic

Lets Automate !
Navigator | Tier 3
November 27, 2024
this is another issue sir this filtering the details and that detail should enter in another excel this is also not working
​@Zaid Chougle 

 

Navigator | Tier 3
November 27, 2024
this is deleting the row isssue sir ​@Zaid Chougle