Insert and Delete Row

This activity allows the user to add or delete the number of specified rows in the
provided input excel sheet. This activity works within the Excel scope activity.

Technical Reference

 

 

 

 

 

INPUT

Action: Indicates to choose the action from the drop-down.

Insert: Helps to insert number of specified rows in the provided input excel sheet.

Delete: Helps to delete the number of specified rows from the provided input excel sheet. 

 

By default, it will be configured to “Insert” option.

NumberOfRows: Indicates to provide the “Number” of rows that need to be added / deleted in the provided input excel sheet.

 

You can either hardcode the value in an “Integer” variable or enter the value in “Integer”.

 

This parameter accepts values in the “Integer” datatype.

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

StartingRow: Indicates to provide the “Position” of the row to be inserted in the provided input excel sheet. The index position of the row begins from “0”.

 

You can either hardcode the value in an “Integer” variable or enter the value in “Integer”.

 

This parameter accepts values in the “Integer” 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 “InsertAndDeleteRow” 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 “ReadRange” activity’s example.

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

a.       In this case, I am removing the “third” row from the existing excel sheet using
this activity.

b.       Now, double click on the activity.

i.      Here I am providing the “StartingRow” value as “2”.

ii.      The index position of the column starts row “0”, hence I have given the value as
“2” to delete the third row.

c.       Next, moving to the “NumberOfRows” field, here I am going to delete only one
row, so entering the value as “1”.

d.       Now, navigating to the “Action” in the properties. Here I am changing the
action to “Delete”.

e.       Then, moving to “SheetName” and providing the value as “Report” in the
box.

3.       Now, execute the workflow.

The bot will remove the “third row” from the provided input excel sheet.

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