Find_the value in excel table

Hello every,
I need your help .I have an table in excel and I just want to check that what value exist in front of B2 cell.
So how can I do it?
Can any body help??

I have attached the scrren shot .In which I want to check that what value exist in front of CR or FF ,
So how can I do it…

2 Likes

Using Excel Application Scope,
pass the excel file as input.
use Read cell activity, specify the sheetname and address as “A2”, output will be saved into a string variable.

Use that string variable to know what value present infront of B2.

2 Likes

thanks @KarthikByggari,
but I want the value in front of CR and FF. like here is Jagool and Xyz
and every time CR or FF is in everywhere.

2 Likes
  1. Read the excel file using Read Range Activity
  2. Use for each loop to to read rows one by one
  3. Put if condition inside the If row("Code").ToString.Equals("CR") or row("Code").ToString.Equals("FF")
  4. You can store ID in any variable using Assign activity row("ID").ToString

That’s it.

2 Likes

You can use the following activity to search and find the address of the search value -

Include this step before read cell. Before that extract the row number from the found address.

3 Likes

thanks @vikaskulhari
for yore help…
But its not giving the value in front of CR or O2.
Can you please help or give a sample example

1 Like

Watch this video.it will help you.

1 Like

Hello @Nidhi2
Please use this code in an Assign Activity
((DT.AsEnumerable.Where(Function® Convert.ToString(r(“ID”)).Contains(“CR”) Or Convert.ToString(r(“ID”)).Contains(“FF”)).Select(Function® (r(“Code”)))).ToArray)

It’ll give the values from first column containing FF and CRin the second column
Check this workflow for better understanding
LinqGettingColValue.xaml (13.7 KB)

2 Likes

Thanks everyone for your help…

1 Like

@Nidhi2 Your issue resolved ??

1 Like

thanks @vickydas for your help.
but in this workflow the values are defined .I want the dynamic type.
Like any type of data exist.bot will only find that value which exist in front of CR and FF.
can you please help

no @vikaskulhari
can you give me sample example.
because I have tried it but it gives me blank result…

Hi Nidhi, I have found something for you. Use the Select Method to get required data.
image

For more information, you can watch this video:

@Nidhi2 can you share your workflow so that I can see where are you going wrong?

Hello @Nidhi2
If you want those values dynamic You can add variables in that query
((DT.AsEnumerable.Where(Function® Convert.ToString(r(“ID”)).Contains(variable1) Or Convert.ToString(r(“ID”)).Contains(variable2)).Select(Function® (r(“Code”)))).ToArray)