Write multiple inputs from user to excel file

Several inputs from user needs to be stored in a list or arrays or lets say in datatable.

For ex:
name
age
location
number

I have to iterate each stored value and write to different columns of an excel file. I tried with arrays and collection but no luck.

With arrays I got below error
arrayconverter cannot convert from system.string

Need suggestions

Hi.
Did you try using For each?

I did tried with for each , but not able to create a logic to get user dyanmic mutliple inputs. These inputs are different questions to users and all answers needs to be stored in excel.

How you are getting this inputs? Using Input Dialog or Using Form?

Input dialog but our plan is to use Form in future, working on it as well

Ok then store them inn a array
Say Inputs are in Variable : Name,Age,Location,Number
Assign Array DataArray= {Name,Age,Location,Number}
Then Use Read range for Excel say DT
Then Use For Each Row for DT and set Index in output say RowInd
Then Use
Assign Row(1)=DataArray(RowInd) ------Here i assume data will be stored in second column of Excel sheet

Then use write range after For each Row

just to test above logic, created a workflow with 3 inputs dailogs and stored it’s result in 3different varables. Created a array with these 3 variable.

getting below error

I tried with string and object datatype both

Datatype in which u are assigning make it String

image

There is no values in your variables
Write something in it

These variables are getting input from input dailog box , refer below screen shot

Can You share workflow
Print them in message box and check

Created workflow again to share with you

Test.xaml (6.7 KB)

Dear use assign after input dialog
Arr={first,second,third}

Yea , it’s working. Such a silly mistake I did :upside_down_face:

Great!

Happy Automation!

1 Like

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