Find index of row("Example").Tostring


I have declared my string variable as: Example1=row(“Example”).Tostring.

I use for each row to find value of Example1.
How i can get the cell number position of Example1

Thanks so much!

pass like this buddy @mashy2
if you are passing datatable named out_dt to for each row loop
then inside the loop
out_cell_position = out_dt.Rows.Indexof(row)

where out_cell_position is of type int32 and the above expresssion would give the row index


Were you able to get the value buddy @mashy2

thanks buddy!

1 Like

Thats great buddy
Cheers @mashy2

Indexof with a First function will make it so that you do not need the for each row activity.

int rowIndex = dt.Rows.Indexof(dt.Rows.First(Function(row) row(“Example”).ToString = Example1)

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.