| Solution |
| 1. |
Create a new Variable |
- From Tools->Variable Manager, select User Variables
- Click on 'Add New Variable'
- Specify the name of the variable say for e.g. ImportList
- Select the type as 'List' from the drop down menu
- Click on 'Read from text file' option
- Specify the path of your csv file for e.g. C:\my-csv-to-import.txt
Screenshot 1 |
| 2. |
Import csv file |
- Let's say your csv file looks as shown in Screenshot 2
- Add the variable name "ImportList=" in front of the list to be imported as
shown in Screenshot 3
- Similarly if you have multiple lines of comma separated values you can add
the variable name in front of all those lines and add those variable in
Automation Anywhere Variable Manager as shown in Screenshot 4
|
| 3. |
Process csv file |
- In previous two steps you have setup Automation Anywhere to read the
values from your csv file.
- Now, let's process the values of csv file one by one
- All the values of the csv file in one line will be read into the List
variable. In this case "ImportList".
- You can use this variable in a loop to access the values one at a time.
- See the Screenshot 5 on how it reads each value and
inserts it into the database.
|
| |
| When you run this task, it
reads the values from a csv file and inserts them one by one into the
database. |