Insert and Delete Column

This activity allows the user to add or delete the number of specified columns 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 columns in the provided input excel sheet.

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

 

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

NumberOfColumns: Indicates to provide the “Number” of columns 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 column in the worksheet. This parameter accepts values in the “String” datatype."

StartingColumn: Indicates to provide the “Position” of the column to be inserted 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.

 

 

 

 

 

 

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 “InsertAndDeleteColumn” 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 " InsertAndDeleteColumn " activity within the scope activity.

a.       In this case, I am creating a new column in the existing excel sheet as “Experience”
in the last.

b.       Now, double click on the activity.

i.      Here I am providing the “StartingColumn” value as “Table.Columns.Count”.

ii.      It will help me to add the column in the last after determining the count of the
columns.

c.       Next, moving to the “NumberOfColumns” field, here I am going to add only one
column, so entering the value as “1”.

d.       Now, navigating to the “Action” in the properties, by default it will be selected
as “Insert”. Here I am not making any changes as we are going to insert
the columns.

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

3.       Click here to view the next steps of the example.