Write Cell Formula

This activity enables the user to apply any formula to a specified cell during the
runtime in the provided input Excel sheet. This activity works within the Excel
scope activity.

Technical Reference

 

 

 

 

INPUT

Cell: Indicates to provide the “Cell” reference to write the data in it.

This parameter accepts values in the “String” datatype.

Formula: This parameter helps you to provide the “Formula” that needs to be calculated in the specified cell.

 

You can either hardcode the “String” variable here or enter the values in “String”.

 

This parameter accepts values in the “String” datatype.

SheetName: Indicates to provide the  “SheetName” to enter the data in the provided input excel worksheet. This parameter accepts values in the “String” datatype."

 

 

 

 

 

 

 

MISC

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

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

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 “WriteCellFormula” 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 “WriteRange” activity’s example.

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

a.       Here I am going to calculate the total amount of the “Salary” column and write
in a new cell.

b.       Double click on the activity and providing the cell value as “H1” as the cell
reference.

c.       Next, moving to “SheetName” and providing the value as “Report”.

d.       Navigating to the “Formula” property to provide the formula to add the
values in the column.

i.       Here I am providing the formula as “=SUM (f2+f10)” from the first row to the
last row in the “Salary” column.

e.       Now, execute the workflow.

The bot will add all the values from F2 to F10 and writes the total in the “H1” cell.
Below is asample of the output.