For Each Loops


I have a For Each loop. which iterates multiple rows in item. For Ex

Row 1 contains : 1 ABC xyz

i am trying to find the exact match of ABC that is working fine, now i want to extract the number 1.
How to extract it ?


item(0). “To String option is not coming”

you are using for each ryt
or for each row

Using For Each inside that using an if condition to match the word “ABC” if the match is found i want the serial number of ABC which is “1” which i am not getting using item(0).tostring

what u r exactly iterating ???
Datatable , array or what

if for each item for array
then item(0).tostring will work

I am extracting a table format records from mainframe.
if i give item(0) dot to string is not getting populated - Option strict on disallows on late binding

can u share ur xml so i can modify

I dont have permission to extract that file.
In IF condition its mentioned as
IF item.ToString.Contains(“ABC”)
item(0).tostring - Not working.

Do we need to split the row line before item(0) ?

first check what is showing in item.tostring
in write line


Yes you need to split the string based on delimiter as space.

Try this:

item.Tostring.Split(" "c)(0)

1 Like

@Robotics Check attached zip file (25.4 KB)

Got the result thanks for the info

1 Like