I have a variable with the type of array of string, and I want to assign the values to “Brand” column. Can anybody help me? Thank you
This is my variable and data table
Try below steps.
For Each item in Brand
-Use Add DataRow activity and pass below values to it
ArrayRow - {"","",item}
DataTable - varDataTable
Where varDataTable is output of your Build DataTable activity
I want to add all Brand value to specific column, that is “Brand” Column
Do you want to have this
or this
The first one
Then use lakshmans description, it’s exactly what you need…
If you’re a picture guy, here:
Hi @newuser1,
If your rows are not more than 8000 or array length is less than 8000 then Linq is not going to be a game changer with respect to robot execution time. I think you previously asked to have a linq query to do this.
Check this thread. Except the first part everything else mentioned in this solution will solve your problem.
I have tried using for each.
I forget to say that, I’m using assign activity to add 2 variable (string of array) to add values to CEO and Website column. After using the for each activity, this is the result of the program. The value of Brand Variable begin to be write add 6 row.
So don’t use add row which - as the name implies - adds a new row, but rather go through the datatable with for each row and assign everything in there.
But to be honest, you give us very little information somehow expect us to figure out what your problem is.
Show us what you’ve tried and what your problem is. Everything you want to do can be solved with for each (row) loops and assign activities.