dt_Final.Rows(row_Number)(Column_Number) interpretation

Hi

Let’s take it one by one

First left side

dt_Final.Rows - this gives ienumerable of datarow which means to be simple array of rows

Now in that we want specific cell value and if that is needed we need to know that row and column position

So when you are trying to mention that row and column position We will be mentioning as index

Index value usually starts from 0 for first row or first column

So
dt_Final.Rows(row number)(column number)

Row number and column number here are index positions

So finally we are assigning a particular row and it’s column value to a specific cell

Let’s take like we are in a FOR EACH ROW loop and datatavle is passed as a input to it

Inside the loop we would have used a assign activity like this

dt_Final.Rows(row_Number)(Column_Number) = row((row_Number)).ToString

So here
dt_Final(0)(0) means first cell in first row and first column
It’s more like Matrix (m x n)
Where m is row and n is column

Cheers @lynnsong986

1 Like