How to get index and value in for each row data table
Example for sample excel:
column1
32
45
65
45
Need Index number and value
output:
0 – 32
1–45
2–65
3–45
both are output are in integer type
thanks
shaik
How to get index and value in for each row data table
Example for sample excel:
column1
32
45
65
45
Need Index number and value
output:
0 – 32
1–45
2–65
3–45
both are output are in integer type
thanks
shaik
Use For Each Row in Datatable activity
Assign IntIndex variable to index property.
Inside body you will have index and value in integer
Thanks,
Ashok
@shaik.muktharvalli1
DataTableIteration.xaml (9.9 KB)
check the file
in for each row activity go to properties panel and set the variable in the Index. inside the loop u can use that index to get the value.
You can achieve this by using the “Excel Application Scope” activity to read the Excel file and the “For Each Row” activity to iterate through each row of the data table. Here’s how you can do it:
index = row.Index.ToString
value = Convert.ToInt32(row(“column1”).ToString)
Make sure to replace “column1” with the actual column name from your Excel file.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.