Write To Excel

Write To Excel activity is used within the Excel Loop activity to update specified variables into an excel sheet. Write to Excel activity can be used in the combination of Excel Loop activity. This activity cannot be used as a standalone activity to fetch data.

  
Using Write To Excel Activity

First, let’s open the Studio and set up the 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.



    The Output Parameters dialog box has 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.
    Now, let’s add the Write To Excel activity within the Excel Loop activity.
  6. Double-click the Excel Loop activity on the Canvas.

 

 

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

 

 

  1. In the Write To list, select the variable you want to update. If you use New Excel Sheet, a new worksheet is created within the excel sheet to populate the desired output.
  2. In the Value list, select the variable in which output is stored while performing the automation process.

 

Write To Excel Properties

The properties of Write to Excel 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.

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 Write To Excel. You can change the name as required.