Hi, I want to find the keyword in the excel (keyword is my ID) where from the particular column, Like My column first is ID and I once find I want to make an entry in the excel in the status column.
My Excel Structure
Fine @balkishan
–use excel application scope and pass the file path as input
–use read range activity and get the output as datatable variable named outdt
–use for each row loop and pass the above variable as input
–use if condition inside the for each row loop and mention the condition like this row(0).ToString.Contains(1004")
and if this condition passes it will go to THEN part of if condition where we can use
assign activity like this row(2) = “Yes/No”
so once after processing all the rows
–next to this for each row loop use a kill process with process name as “EXCEL”
–then use write range workbook activity where mention the file path of the excel with the sheet name and enable the Add headers property and mention the range as “A1” and datatable as outdt as it has the updated status column with values in it
So this would work for sure buddy @balkishan
Kindly try this and let know for any queries or clarification
Cheers
Bro ID will come random. like I am using the IF condition and checking the eligibility. Like After checking everything the ID person 1003 not eligilbe then find the id 1003 in the excel and write in the Status column No
–use excel application scope and pass the file path as input
–use read range activity and get the output as datatable variable named outdt
–hope you store the value of that random value of 1004 to a variable of type string named in_value
–use for each row loop and pass the above variable outdt as input
–use if condition inside the for each row loop and mention the condition like this row(0).ToString.Contains(in_value)
and if this condition passes it will go to THEN part of if condition where we can use
write cell activity like this
mention the sheet name and range as “C”+(outdt.Rows.Indexof(row)+2).ToString
and mention the value you want to write
Thats all buddy
Cheers @balkishan
wait wait wait…
buddy this “C”+ (ExcelData.Rows.Index(row)+2).ToString should be there instead of “A1” as range and we need to mention the value we want to mention in the status column in the value property
Hi, I want to know about this method also. can you plz guide me.
i followed the steps as you mentioned.
I got the address is A4 when I search 1003. So next I am using the write cell activity. but it’s not writing.
I gave the condition like this.
c is my status header where I want to write. SearchResult is LookUp Range variable