Convert CSV file to List Variable

 RPA | Store CSV data into List Variable| Automation Anywhere - Part-17


Store CSV Data into List Variable | In this article, we will be discussing the steps through which we can "convert or store the CSV file data into the List variable". So, to convert the CSV file data into List variable the  pre-requisites that we need to fulfill are as follows:-

  1. Microsoft Office should be installed on the system.
  2. Bot Agent should be installed on the system as it is needed to interact with the applications and it is also needed when we run the bots.

Now let us take a look at the steps that we need to follow while storing the "csv file data into the List variable" which are as follows:-

  1. Open the CSV file using the Open command present under the Excel Advanced Package.
  2. After we open the file use the Get Multiple Cells command to fetch the data that is present in the csv file and the output will be stored in the table variable data type.
  3. Loop through all the rows of the table using the For Each row in Table iterator under the Loop command and store the record into the record variable data type. Here the record refers to the rows that are present in the table variable.
  4. Use the String Assign command to assign the record value to the string variable data type.
  5. Next we will use the Add Item command present under the List Package to Add the Item into the list.
  6. Once all the items are added into the list then use the For Each Item in the List iterator to loop through all the items present under the list variable and display the item values one by one using the message box command.

So now we will take a look at the code snippet for the same i.e. to store csv file data into the list variable.





So in this article we discussed how we can store csv file data to List variable using A2019 Automation Anywhere.

If you have any doubts or queries then do please feel free to reach out to me with your queries and I will be more than happy to resolve your queries.

Comments

Post a Comment

If you have any doubts, please letme know.