0

I am trying to get the index of the cell value in an excel sheet using Uipath.

I have tried using Lookup range inside Excel application scope but its giving up the first similar value found in the Sheet as having duplicate values as well.

Please Suggest how we can find the the exact index Of the cell.

I have used

  1. LookUp Range activity

  2. Read Cell Formula

    Col1   Col2   Col3
    DB      AB     BB
    AC      DB     AN
    AK      AB     AC
    

I need to find the IndexOf value DB , located at Col2 2nd row

Manz
  • 593
  • 5
  • 23

3 Answers3

1

I would use a For-Each item in DB activity.

You can iterate through the lines and access the value with item(0).toString e.g⠀

Then you can go on and check up the location of your searched text.

If you run a counter with it, you can easy detecting the Row and Col number of your searched field.

Jeremy Caney
  • 7,102
  • 69
  • 48
  • 77
Benhuen
  • 31
  • 5
  • Did you mean to include a fuller example after the “e.g.”, or was that meant to highlight that `item(0).toString` is meant as an example. – Jeremy Caney Nov 22 '21 at 17:50
1

If you want to lookup in column B alone then you can set range as "B:B" in the Lookup Range Activity. It will search the value in Column B and give you the index found in the 2nd column.

enter image description here

Dharman
  • 30,962
  • 25
  • 85
  • 135
Ghan16
  • 11
  • 2
0

1.Read the Excel it will stored in DAtatable DT 2.Use for each row in datatable 3.Use if condition inside the loop currentrow(1).tostring. Contains(“DB”) 4.Take Assign activity

Var_Index(int Datatype) = DT.Rows.indexof(currentrow)

Its may be work….