Recording with Excel Data
The automation of a form setup is particularly powerful if used in conjunction with a data source. This can be used as the input to the automation and the RPA will carry on in its normal flow but use the data served to it.
This example uses an Excel file which has some data which is pushed into the form as the workflow continues.
To do this is a multi stage process:
Create a Data Source (Excel or CSV file)
Add a ReadExcel object
The ReadExcel object has to be added and the Excel data source selected.
In addition the Foreach Datarow object has to be added and a variable name created (Ctrl K ) and used as a reference exhibitdata (variable)
This is used to reference the table in the Excel file exhibitdata.Tables(0)
Replace the Assign Value
Rather than having hard coded values in the Assign
Video: Running RPA with Excel data
The video shows the recording of a form filling workflow this time the data is pulled in from the Excel spreadsheet
Note
There are some things to look out for.
-
Ensure that the Excel file is not opened while the workflow is running as it may stop the automation
-
Where the recorder has not recognised and added an
Assign<String>
object this has to be be added and replace theType Text
object. -
A useful feature is that rather than having to remove an object no longer required or just for debugging, by right clicking the option a Comment is available and this will act just like a code comment and disable the object.
-
Unless you follow the guide on the OpenRPA website to the letter you may forget to place the form fields inside the Foreach DataRow sequence. Luckily it is just a simple matter of moving objects and ensuring the Foreach box border is surrounding the other sequences so that the data can be looped correctly.