Loop through array and write in a data table

Hi I am beginner in uipath… i have attached my project file
overview of project
total 3 variable getting from user and store it as string array…
then it is converted into datatable
then it is written in csv file
the problem here is only one variable is storing in array please help me I don’t no where I done mistake

Just an fyi that no file was attached.

Are the 3 variables being stored as 3 separate variables in uipath?

How are you converting 3 variables into a datatable? Is it just going to be a datatable that is 3 columns long with a single row?

Actually i try to attach the file but it is not uploading… i m getting error as sorry new users cant upload…
2) no it is not storing three different variable…
for example
arr is variable getting from user input
for (I =0; I<3;i++)
a = arr;
like this I am getting 3 values from user input and store it in array… using loop.

  1. converting variable to datatable
    build datatable and add row activity… these two things i am using to convert string array to datatable…
  2. no it is single col with 3 rows …

Hi @Pavithra_Mahalingam

Try this workflow: Array_To_DT.xaml (8.4 KB)

What is the point in storing in an array for this particular use case? Why not just put it directly into the datatable?

In your for loop, just use the ‘add data row’ activity and include the user input in the itemarray property

Hi @Dave

Actually when I try to convert string to data table using Build data table…
input should be given in the form of array right… so I try to convert the string to string array then use it in build data table activity

Hi @Dave Sorry its not build datatable… it is add data row

here is a quick .xaml example i threw together explaining what i mean. It doesn’t use the for loop at all, but you should be able to use the same concepts: pavithra.xaml (8.4 KB)