Updated February 6th 2018.
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.
User can choose any of the below option as source type:
Select Data File to Read
Clicking “Select Data File to Upload” will open file dialog using which user can choose a file to be uploaded from file system, after file selection the file will be saved in Leaptest.
Note: User need to re-upload the file in case file content is modified.
Path To file
Clicking “Path To File” will open file dialog using which user can choose a path to file from file system (it can be a shared network path also), after path selection the file path will be shown then the text box.
Note: User can directly update file content as file is not save inside Leaptest rather it is referenced from a path (Range must be defined again in case more row/column have been added otherwise updated content from previously defined range will be used).
Fields that enable the use of external values (dynamic data) in the “Path To File”.
To use the value of an added field, right-click the text field above where the Path To File can be entered and select “Insert token” and then insert this field’s name.
Fields can be renamed by double-clicking on them. The tokens will change their visual appearance accordingly.
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”.
It’s possible to select data from any sheets in the Excel file but, it’s only possible to select one data range in a Read Excel building block.
This green output connector triggers if the block is not able to read the excel file or excel file is not found.
This connector can be used to branch the execution of the flow depending on whether block is not able to read the excel file or excel file is not found.
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.