Hello everyone,
I got problem with my DataTable, where there are multiple rows and columns. I need to extract data from spesific index of row and coulum. Kind like this, for the row I need to start from Index 1, and column start from Index-7. I’ve tried:
-
Using “foreach loops row” from DataTable
ForEach rowPosition in dataTable
ForEach row in RowPosition
Not working because the output of rowPosition is DataRow. -
Using Assign to get the index both for row and column, then put it into datatable
rowIndex = dataTable.Rows.IndexOf(rowPosition)+1
columnIndex = dataTable.Columns.IndexOf(“columnName”)+1
dt2 = dtPayment.Rows(rowIndex)(columnIndex)
Not working because of disallows converstion From Object To DataTable -
Using Add Data Row from Activities, where
ForEach rowPosition in dataTable
AddDataRow
Input = rowPosition
Output = newDT
Not working because of “Add Data Row: Object reference not set to an instance of an object.”
I need to do subtraction between column-7 and column-8, column-9 and column-10, etc.