Read Ranges

This activity helps to read the data from a specified range and return the output as a Datatable.

Technical Reference

 

 

 

INPUT

Range: Specify the range of cells which has to be read by the bot.

SheetName: Specify the name of the sheet from which the values has to be read.

 

 

 

 

 

 

 

MISC

AutomaticCalculations: Check this box if the formula given in the worksheet should be used for automatic calculations.

Display Name: Displays the name of the activity. You can also customize the activity name to help troubleshoot issues faster. This name will be used for logging purposes.

IncludeColumnHeaders: Check this box if the column headers has to be displayed.

SkipOnError: It specifies whether to continue executing the workflow even if it throws an error. This supports only Boolean value “True or False.”

True: Continues to execute the workflow irrespective of any error thrown.

False: Stops the workflow if it throws any error

Version: It specifies the version of the excel automation feature in use

 

 

OUTPUT

Dataset: Declare a variable here to see the output as a dataset

Datatable: Declare a variable here to see the output as a datatable.

Result: Define a Boolean value to validate the success state of the activity. This is not a mandatory field.

*Mandatory field to execute the workflow and see the output.

Use Case:

The following activity illustrates on how we can use the read ranges activity to read data in a specified sheet within specific ranges and get the output in a table. Here we are going to use the variable from the dataset and see how we get the output when the input given in the input table of the table viewer is changed. Here we will be using the input as DS.Tables(0), which gives the data in the first sheet for the specific range and then give the input as DS.Tables(1) which gives the data in the second sheet for the specific range.

Example:

1.      Drag and drop a get excel object activity to the workflow.

2.      Enter the file path of the excel file in which the worksheet to be worked on is present.

3.      Drag and drop the read ranges activity into the Get Excel object activity.

4.      Click on the read ranges activity.

5.      Enter the cell ranges which has to be read.

6.      Enter the sheet name which has to be read.

7.      Declare a variable in the dataset box of the output segment. Here it is DS.

8.      Drag and drop a table viewer activity from datatable automation.

9.      Click on the activity.

10.   Give the input as DS.Tables(0)

11.   Give the title for the window.

12.   Execute the activity.

13.   To see the second set of data, enter the input as DS.Tables(1) in the input table of the table viewer property box.

14.   Execute the activity again.

 

The bot executes the activity and gives the specified range in the first sheet as the output when the input is given as DS.Tables(0) and gives the specified range in the second sheet as the output when the input is given as DS.Tables(1).