Excel delete multiple columns


How to delete multiple columns in the excel sheet
del.xlsx (9.4 KB)

i want to remove course & fee column from the attached excel sheet .
Please provide me sequence

hi @vikumars

Based on Macro we can delete multiple columns in the sheet
use the below code
Sub sbVBS_To_Delete_Multiple_Columns ()
End Sub

Mention the column name and use Excel Application and use execute macro activity and call the function name as sbVBS_To_Delete_Multiple_Columns

Ashwin S

1 Like


Could you please provide me in sequence,it will be useful to understand

Hi @vikumars,

Delete column
Try Send hot key to delete the columns.
Alt+H,D, then C

Else try Macro to delete the columns.


hi @vikumars

Please find the attachment Sample_Macro_Execution.zip (2.1 KB)

Do i need delete column activity and then use this send hot key??

hi @vikumars

@arivu96 Is telling you to use Send Hot Key Activity

Ashwin S

There should be a better way to do this.

The Remove Data Column activity should be able to accept a list of ints.


I found a better way to do wath I wanted, maybe this can be the answer to your question.

By using a Filter Data Table and then go to the Output Columns and click Remove and then specify the index of the columns you would like to remove (Name of the column also work).


1 Like