I use the Framework Template, and here in the first stage i extract DataTable from a Excel File and transform in DataRow. The problem appear when I need the Index Number from a DataRow. Without a loop. Please Help.
you transform DataTable into
DataRow it’s an array of DataRows, if you want to access items in a
you will use the same logic of accessing items in DataTable meaning
YouDataRowArray(0)(0) will give you the first item of the first row.
Thank you Reda, for your answer, but it give me the first element from Excel, and i need the index…
I send you a piece of my project to see how i am doing this.IndexExtract.zip (9.5 KB)
Do you want the index meaning the Column Number?
No, the row number i want
is this what you need?
IndexExtract.zip (9.6 KB)
EDIT: To get index of particular datarow in datatable use
index = dt.Rows.IndexOf(datarow)
Thank you J0ska. It works, but i need to do this without a For loop, because i use the FrameWorkTemplate, where i take the DataRow from GetTransactionData and process in the Process Stage…
Why do you transform DataTable into array of DataRow?
What for do you need the index?
Thank you for your response J0ska, but from your solution i find mine. I need to transform in DataRow because i work with FrameWork Template and if you rememeber i need to transform the DataTable in DataRow to take every time a row and process him, not in a loop. I hope you understand. The point is that i know now the solution.
Thank you all for your responses and a good day to all!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.