For loop: access looping variable as string

Thank you for your response , actually I am getting total rows count

example :
Excel sheet:
1 A
2 B
3 C

Now I want to know that , when loop is running , what value it stored in def i
for (def i = 1; i <= numOfRows; i++) {

I don’t understand your post. Sorry, I would quit.

Actually I want to print value what ever store in loop
Example :

for (def i = 1; i <= findTestData(‘file_name’).getRowNumbers(); i++) {
in excel Row 1= Noor Khan
in excel Row 2= Kazurayam

now when loop runs so what value is stored in i , i want to print that value 1st, then remaining case run

So you do not want to print the value of i, but you want to print some data from your data file? i is just a counter. it will change from 1 to the number of rows in your data file.

Actually my case is that
I need to create user using loop (data from excel)
if user is already available then close brewer
else create user

Then read the row i/column x from your spreadsheet in the loop and check it against the element on the browser page. This is standard data driven testing.