Data Table to Row to String

Hello Experts,

I have one DataTable DT1, So DT1 has thousands of rows in it.
I want to get the rows one by one.
For this I am using For Each Row in Data Table Activity.
Then I need to get that row in String.

I tried to use CurrentRow.ToString but its giving me error.

Thanks in Advance

Hi @SP_Bot

Yours approach is correct u just need to use below expression for Converting DataRow into String.

String.Join(",",CurrentRow.itemArray)

image

Hope it helps!!
Happy Automation :uipath:

Hi @SP_Bot

Try this

String.Join(", ", CurrentRow.ItemArray.Select(Function(item) item.ToString()))

Regards,

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