Hello,
it is the second time that I was looking for a solution to transform an array of string to a datatable without using a for each loop. Since I didn’t find anything but found a solution here my advise:
- Assign: Array of String → String{abc,def,ghi}
- Assign: Convert array of string to a string → string.join(“?”,YourArray)
- Chose your separator according to your problem. Shouldn’t be part of any of your strings in the array
- Generate Datatable:
- Newline separator = separator you chose before → “?”
- Column separator = see what fits best for your use case
In this ticket they were also looking for something like that:
Converting String [] to datatable variable - Learn / Academy Feedback - UiPath Community Forum