Read Ranges

This activity helps the user to read and extract the data from a specified range in the
provided input excel workbook.
This activity works within the Excel scope activity.

Technical Reference

 

 

INPUT

Range: Indicates to provide the “Range” to read the data in the specified input excel sheet. This parameter accepts values in the “String” datatype.

SheetName: Indicates to provide the “SheetName” to read the data in the worksheet. This parameter accepts values in the “String” datatype."

 

 

 

 

 

 

 

MISC

AutomaticCalculations: This parameter helps you to perform “Automatic calculations” if any formulas are available in the input excel sheet.  

If left unchecked, it will not consider to perform the calculations.

DisplayName: Displays the name of the activity. The activity name can be customized, which aids in troubleshooting.

IncludeColumnHeaders: Indicates to include the “Column Headers” in the excel sheet while reading the data in the provided input excel sheet.

If left blank, the column headers will not be considered.

SkipOnError: Specify the "Boolean" value as "True" or "False."

 

True: Continue executing the workflow regardless of any errors thrown.

False: Halt the workflow if it encounters any errors.

None: If the option is left blank, the activity will, by default, behave as if "False" were chosen.

Version: It indicates the version of the feature being used.

 

 

OUTPUT

Datatable: It helps to view the output as extracted range in “Datatable” format. It returns values in “Datatable” datatype. Refer the below example to create the variable.

Result: It provides the ability to view the execution status of the activity. It returns values in "Boolean."

True: Indicates that the activity has been executed successfully without any errors.

False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

Represents mandatory fields to execute the workflow

Here’s an example of how “ReadRanges” activity works –

In the following example, I am using the “Excel sheet” which is used to automate
in the Use case. To get a better understanding, click here.

This report encompasses employee particulars like Name, Position, Age, Office,
Start date, and Salary.

1.       Here, I am continuing from the “CreateWorksheet” activity’s example.

2.       Now, placing the " ReadRanges " activity within the scope activity.

a.       In this case, I am reading and extracting the whole range of cells in “Day1”
available in the excel workbook. Refer the attached excel sheet. 

b.       Double click on the activity to provide the “Range” to extract the data.

i.      I am going to enter the range value as “A1”.

ii.      This will help to read the data whole range of cells which contains the data
in the sheet.

c.       Moving to the “SheetName” and providing the name as “Report”.

d.       Navigating to the “Datatable” in the properties to declare a variable to view
the output.

i.      There are two ways to create a variable-

ii.      Method 1 – Click on the "Datatable" property within the "ReadRanges" activity
and enter the variable name. In this case, we are using “Table." Then, press
"Ctrl+Q," which is a shortcut key to create a variable.

iii.      Method 2 - Click on the Variables pane and enter the name " TableCount."
Then, in the "Variable Types" column, select "Browse for Types" from the dropdown
menu.

iv.      The .Net window for data types will appear on the screen, enter the type
name as “System.Data.Datatable” and then click on “OK” button.

3.       You can add the “TableViewer” activity to view the data extracted. Click
here to know how to provide the values in the activity.

4.       Now, execute the workflow.

Below is a sample of the output of the activity.

Click here to know how the activity is used in the workflow.