Author: August 22, 2016. ,
The “Read Excel” block is used to read an Excel file, select a range of data and then use that data to drive an automation case.
See the Drive data with Excel lesson to get an example of how to use the Read Excel block.
Fully expanded, the “Read Excel” block looks like this (with sample data):
The Block Header (“Read Excel”)
The green input connector in the header is used to trigger the block to start executing.
The green output connector in the header triggers when a row from the Excel file has been read. If “Method” is set to “Iterate” (see below), this output connector triggers on each iteration until all rows in the selected range are iterated through.
The title of the block (“Read Excel”) can be changed by double-clicking on it and typing in a new title.
The file used to read data from. Click on the ellipsis (…) button to upload a new Excel file.
The range and sheet inside the Excel file to use. Click the field to select the range and sheet in a popup window:
When selecting the range, check the “Use first row as header” if you wish to use the first row’s column data as field names in the block. In this example, the fields would be “Username”, “Password”, “Full name” and “Role”.
Fields (Named or Columns)
Once the Excel file is loaded and a range has been selected, the column data for each row is accessible as fields.
The data selection method. Select between:
When using the “Row index” method, specify which row to get data from.
When using the “Iterate” method, when the iteration is completed, this green output connector is triggered.
The following example iterates through all rows in an Excel file that contains a list of usernames and passwords (among other fields) and logs each username/password combination. Once the iteration is completed, the case is passed: