kinda embarrassed to ask this … and I know the answer is something really simple
when, I’m looping through, how do I return the current row number ?
(I know I could create a int and just count that but there must be an inbuilt variable?)
kinda embarrassed to ask this … and I know the answer is something really simple
when, I’m looping through, how do I return the current row number ?
(I know I could create a int and just count that but there must be an inbuilt variable?)
Hi @hughabbott
There is an index property in for each row which returns the row index of current row
could you give me an example.
row.index or something like that ?
actually, I thinking about a “For Each Row” activity.
If I wanted to have a message box tell me which row is the current row number … how might I get that ?
Nived - I wonder if you might type in the line of code ( I could not open the xaml file because of a version conflict )
thanks for your help thusfar.
Hugh
Hi @hughabbott
Here index variable is created in index property of for each row
Please Note
Regards
Nived N
Happy Automation
Hello if the intention is to discover an excel line to write in it, I use the following method.
The activity (LookUp Range) does a search in excel for something of your criteria, a text for example, and returns the cell, except for A5, then you save it in a Var.
To write in excel in C5 for example.
Use Write Cell, and as input Var.Replace(“A”, “C”)
Write in the cell, in the line with the value found, but in column C.
Main.xaml (10.2 KB) teste.xlsx (9.1 KB)
Can u show the property panel of match address?
I get it now … I thought the there was some kind of reserved word for index, I did not know you set it each time to your own variable.
I knew it was a very basic error … now I get it.
sorry for being stupid !
and thanks for your help
You can get index of a particular row using below code, @hughabbott
Integer_Value = DataTable.Rows.IndexOf(row) and DataTable will be same which you pass to the For Each Row Activity.
Hope this may help you