nick.v
(nic)
July 30, 2020, 2:51pm
1
Hi,
I am looking to search for a word in excel and if it exists the bot is to continue to the next row if it doesn’t exist it is to delete the row?
Needing some advice on the best way to achieve this. Is it possible using the excel application scope or would i need regex code to do this?
Appreciate any help
balupad14
(Balamurugan (BalaReva))
July 30, 2020, 3:04pm
2
Hi @nick.v ,
To search the data inside excel, you can use the “Find” activity which is in the below. It returns the cellinfo and rowindex.
Hi,
A situation to find and replace the text inside the Excel. For that purpose, I have developed some activities below.
Find - Find the text inside the sheet. It will return the cell info as an array string and row indexes.
FindReplace - Find and replace the text inside the Excel sheet.
[image]
[image]
Regards
Balamurugan.S
Video explanation :
Delete the row.
Hi ,
I have developed a new activity to delete the contiguous rows in side excel sheet in the package version 6.0.0. You can get the package Here .
Important Property :
Row Range : { “1”,“3:5”,“11”,“20:35” }
Namespace :
[image]
Activity and Properties :
[image]
Regards
Balamurugan.S
Regards
Balamurugan.S
Hi @nick.v
Below is the workflow which will give the idea.
Remove DataRow on Condition.zip (34.7 KB)
Just make changes as per into the below Statement in the workflow
datatable.Select("[columnName] = 'ValueToSearch'")
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
nick.v
(nic)
July 31, 2020, 10:42am
4
Hi @Pratik_Wavhal ,
Thank you for providing me with an example, i hvae ran the workflow you have provided however i need the bot to only copy forward any row that begins with ‘UiPath’ in column A. i have re attached your workflow with a few minor changes.
I appreciate your help on this.
Foreach Seq.xaml (7.1 KB)
Hi @nick.v
Can you provide the Excel data on which you are working so that i will get some idea ??
And also show exactly what u r trying to do from that data, means what exact output you are searching for
Happy Automation
Best Regards
Er Pratik Wavhal
nick.v
(nic)
July 31, 2020, 11:38am
6
Hi @Pratik_Wavhal
Sure no problem i have attached the excel data we are capturing the date from.
Only the rows with ‘UiPath’ in the first column i want to copy to the new excel sheet. everything else including the headers i do not need.
hope this helps.
Thank you
List Price - Copy.xlsx (47.0 KB)
Hi @nick.v
Below is the workflow for the same :-
MainPratik.xaml (9.1 KB)
List Price.xlsx (63.8 KB)
Output :-
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal