I’m still very new to UiPath Studio, so please forgive if this is a silly question, but I need some help.
I have a spreadsheet with some test data - Name, Surname, Date of Birth etc, and I want to populate the fields of a Windows form using this data. When the first line of the test data has populated the Windows form, the form is saved. And then I want the second row of the test data to populate the form, and so on until all rows of the test data have been used.
I’ve used Excel scope/Use Excel File/Read Range to read from the excel spreadsheet and save the test data to a data table (called dtTestData), but I’m not sure what to do next. Would I use a ‘For Each Row’ of the data table? If so, how would I do this?
Yes. You can then reference each field for the current row you’re iterating, and populate your form however you need. datarow reference would be something like: CurrentRow(“YourFieldNameHere”).ToString
Examples below.
Red=Default object - no need to declare it or create the variable, it is created when the activity is made and only used in this loop’s scope
Blue=Your DataTable variable name
Body sequence is where you would put your code to fill in the form.