Skip to main content

Deleting excel row with date


Forum|alt.badge.img+5

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

November 28, 2024

@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
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • November 26, 2024
abishek22225 wrote:

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. 

 

Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • 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
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • 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.

 

Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • 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
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • 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.


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • November 27, 2024

Ok Sir Thank you


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • November 27, 2024

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

 


Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • November 27, 2024

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


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • 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 

 


Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • November 27, 2024
this is deleting the row isssue sir ​@Zaid Chougle 

 


Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • November 28, 2024
Pinned reply

@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).

 

Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+15
  • Navigator | Tier 3
  • 217 replies
  • November 28, 2024

Another logic is what you can do is ​@abishek22225, you can use while loop, after the end of the while loop you can get the shifted date and that will again check the while loop, once the condition is false than it will come out of the while loop and traverse in the excel loop

 

Forum|alt.badge.img+5
  • Author
  • Navigator | Tier 3
  • 19 replies
  • November 28, 2024

Thank you for this Answer sir now I have a logic that we can see the details of student present for example : There is birthday for student in college i need to send wish throug mail and save in another excel who has birthday if there is no birthday it shoud enter no one has birthday in that log now there are 60 students. loop was checking the 60 students and  there is birthday for one student it enter correctly in log but the 59 don’t have birthday it enter in the log that no one has birthday what should i do now?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings