Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Using the For each row in CSV/TXT iterator

  • Updated: 4/07/2021
    • Automation 360 v.x
    • Build
    • RPA Workspace

Using the For each row in CSV/TXT iterator

Use the For each row in CSV/TXT iterator in the Loop action to read the data of each row in a CSV or text file and assign the current row to a record variable. The bot reads the values in each cell as string-type values, even if there are numerical values.

Prerequisites

First, open the CSV or text file. Using the Open action for CSV/TXT file

Note: The For each row in CSV/TXT iterator only supports CSV/TXT files that conform to the RFC 4180 standard. For more information about the standard, see Common format and MIME type for CSV files.
To use the For each row in CSV/TXT iterator in a Loop action, do the following:

Procedure

  1. Double-click or drag the Loop action from the Loop package in the Actions palette.
  2. Select the For each row in CSV/TXT option from the Iterator list.
  3. Enter the name of the session that you have used to open the CSV or text file in the Open action.
  4. Select a record variable from the Assign the current row to this variable list or create a new one.
    Note: If you select an existing record variable, ensure that the column headers capitalization in the CSV or text file match that of the schema of the record variable. Schema

Next steps

Insert actions to use the values from the CSV or text file in your automation. Use the record variable to retrieve the values by index number or column name. For example, if the first column of the file is titled EmployeeID, to retrieve the value of the first cell of each row enter $rYourVariableName[0]$ or $rYourVariableName{EmployeeID}$.
Note: You must select the Contains header option in the CSV/TXT > Open action to specify the record values by column name.

For an example, see Build a Bot Insight dashboard bot.

Send Feedback