Automation Anywhere Call: 1-888-484-3535   

 
Web Data Extraction
  Home > Product > Solutions > Excel Automation > T33  
T33 - Delete Duplicate Excel Rows
Task Description
Automation Anywhere provides easy Excel Automation. For more information see Excel Automation Solution. This examples shows how to sort the data in Excel sheet and delete duplicate entries if any.

Solutions
To see how the task runs in Automation Anywhere, download the files.

Automation Anywhere Task file chkDuplicateEntries_Excl.atmn    T23 Excel TestData.xls

Note: Save the xls in C: drive, the .atmn file in My Documents -> Automation Anywhere -> Automation Anywhere -> My Tasks

Below are the steps that make the Task:
Define Variables

Go to Variable Manager and create variables "CurCellValue" and "NxtCellValue"



Screenshot 1








Screenshot 2










Screenshot 3


Create new task

Click on New->Task Editor.
Open Excel sheet

From Application Category->Excel, Select 'Open Spreadsheet' option.
Sort data in Excel sheet

Insert Keystroke command to sort data in Excel sheet.

Keystrokes: [CTRL DOWN]a[CTRL UP] in "Microsoft Excel - TestData.xls"
Keystrokes: [ALT DOWN]d[ALT UP] in "Microsoft Excel - TestData.xls"
Keystrokes: s in "Microsoft Excel - TestData.xls"
Keystrokes: [DOWN ARROW][DOWN ARROW] in "Sort"
Keystrokes: [ENTER] in "Sort"
Keystrokes: [ENTER] in "Sort"
Retreive value of 1st cell

Insert Excel command to get the value of the first cell

Excel: Go to cell "A1"
Assign value to variable Clipboard

Insert Excel command and assign the value of variable to "Clipboard"

Excel: Get value of Active Cell and assign to variable "Clipboard"
Go through all the cells until word 'STOP' found

Insert Loop for variable "Clipboard" not equal to "STOP".
Check for duplicate value

Insert a Loop to check value for currently active cell is equal to that stored in the variable "CurCellValue"

Loop While $CurCellValue$ Equal To $NxtCellValue$
Delete the duplicate row

Insert Excel command to delete the entire row.

Excel: Delete Active Cell with option entire row
If Duplicate value is not found then assign value of cell to the variable

Insert Excel command to store value to Active Cell to "Clipboard"

Excel: Get value of Active Cell and assign to variable "Clipboard".

When you run this task, it will sort the data in an excel sheet. Then it will loop through each cell in first column until word 'STOP' is found and will delete duplicate entries from the first column.
Automation Anywhere

Next Steps
Buy Now Buy now
Download Free Trial Download free trial
Compare versions Compare versions
Watch a flash demo Watch a flash demo
Contact me Contact me
Ask the Expert Ask the Expert
Request live demo Request live demo

Call 1-888-484-3535

Our Customers
ibounce

We started using this product to copy data from legacy system to new system. Now we use it just to do about anything automated. Countless hours saved. Thank you guys.
- Jack Greenberg

Read Customer Testimonies >>
  Products     Download     Purchase     Services     Support     Customers     Company     Sitemap     Trademark © Tethys Solutions 2008 Privacy Policy