Excel Loop

Excel loop activity is used to perform automation by reading values within an excel. In excel, there are number of rows and columns of the same nature and works in a loop where same set of actions are performed on each row available in the excel. Before using this activity, make sure you have an excel to read.

Using Excel Loop Activity

  1. In the Canvas Tools pane, click Files to expand the tool and view the associated activities.
  2. Drag the Excel Loop activity and drop on to the Flowchart designer on the Canvas.

 

 

  1. Click Excel File Location. The Open window appears.

 

 

  1. Select the excel file you want to automate and click Open.
  2. In the Excel Sheet list, select the sheet or workbook you want to perform automate.
  3. Select the Has headers check box if the selected excel has headers.
  4. Click the (Settings) icon. The Output Parameters dialog box appears to set data type and parameters.



    Output Parameters dialog box have four columns:
    1. Headers Names: In this column, you can view the headers name of the selected excel. This column is not editable.
    2. DataType: In this column, you can select the type of data for headers from the list. The available options are – Text, Numeric, Decimal, Boolean and DateTime.
    3. Text: This data type is used to determine the value of the defined variable as text, such as, Dave, Stock.
      • Numeric: This data type is used to determine the value of the defined variable as Numeric, such as, 10, 88.
      • Decimal: This data type is used to determine the value of the defined variable as Decimal, such as, 10.01,9.04.
      • Boolean: This data type is used to determine the value of the defined variable as Boolean, such as, true, false.
      • DateTime: This data type is used to determine the value of the defined variable as date and time stamp, such as, 01122020;14:09:05.
    4. Reuse Header Name: Select the All option if you want to reuse all the existing headers of the selected excel. You can even select the required headers individually by selecting the check box available in the headers row.
    5. Parameter: In this column, headers parameter is available. You can edit the parameter name as per your requirement. These parameters are used to store the value and get the desired output. Parameter works like a variable.
  5. Click Confirm to save the changes.

Excel Loop Properties

The properties of Excel Loop activity are listed in the following table and can be edited in the Properties grid on the right pane.

 

Property Name

Usage

Control Execution

Ignore Error

When this option is set to Yes, the application ignores any error while executing the activity.

If set to NA, it bypasses the exception (if any) to let the automation flow continue; however, it marks the automation status as failure, in case of an exception.

By default, this option is set to No

Delay

Wait After (ms)

Specify the time delay that must occur after the activity is executed. The value must be in milliseconds.

Wait Before (ms)

Specify the time delay that must occur before the activity is executed. The value must be in milliseconds.

Loop Properties

Excel File Location

The file path of the selected excel is displayed in this field. You can also define the file path directly in this field. The format to define the file is D:\MST\Stock.xls.

Has Header

Select this option to use the existing headers of the selected excel.

Page Size

Defines the number of rows to be considered as a page in the Excel. Minimum value should be at least 1.

Range

Specified area is considered in the loop based on the range provided, for example, range A1:A15 consider column A and rows 1 to 15; Range A1:C5 consider Columns A,B and C and rows 1 to 5.

Save Option

Specify the Save Option for the results in the excel to be saved. There are four options to save the results –

Cell : It saves the result after each cell.

Row: It saves the result after each row.

EndOfLoop: It saves the result once the entire loop is completed.

None: It won’t save the results in the excel.

WorkSheet

Specify the name of the worksheet in the excel.

Misc

Breakpoint

Select this option to mark this activity as the pause point while debugging the process. At this point, the process freezes during execution allowing you to examine if the process is functioning as expected.

In large or complex processes, breakpoints help in identifying the error, if any.

Commented

Select this option to mark this activity as inactive in the entire process. When an activity is commented, it is ignored during the process execution.

DisplayName

The display name of the activity in the flowchart designer area. By default, the name is set as Excel Loop. You can change the name as required.