Assign all of the row in one assign

Hi Team,

I need to get all the cells in the row inside for each row in excel activity in one assign.

@omar_ismail

You can use currentitem.Itemarray..ToArray this will give array of items…

If you need string will all cells concatenated String.Join(",", currentitem.Itemarray..ToArray)

Cheers

Hi @omar_ismail

For Each Row in DataTable ‘YourDataTable’
Assign ‘rowValues’ = String.Join(" ", row.ItemArray.Select(Function(x) x.ToString()).ToArray())
// ‘rowValues’ now contains all the cell values from the row

Hope this helps

it’s giving me an error

@omar_ismail
Can share the screenshot of the error

@omar_ismail

if you are using for each row in datatable use this

string.join(",",currentrow.itemarray.toarray)

I am using for each row in excel

@omar_ismail

I gave the expression to be given inside for each row in datatable

Please change currentrow to whatever each row in datatable is called

cheers

@omar_ismail

please try this

string.join(",",currentrow.DataTableOutValue.Rows(0).itemarray.toarray)

cheers

@omar_ismail

string.join(",",CurrentRow.Current.tolist)
1 Like

image

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.