Delete multiple CSV or Excel columns and column range

You can use invoke VBA activity for this,

Do this one time on excel,

In order for this activity to work, Trust Access to the VBA project object model must be enabled from Excel (File > Options > Trust Center > Trust Center Settings > Macro Settings > Select the Trust Access to the VBA project object model check box).

Put the code on text file,

Sub macro()

Range(“AC1”).entirecolumn.delete
Range(“CM1”).entirecolumn.delete
Range(“CO1”).entirecolumn.delete
Range(“CQ1”).entirecolumn.delete
Range(“CS1”).entirecolumn.delete
Range(“DV1:EA1”).entirecolumn.delete

End sub

In the code file path give the text file path
In method name give macro

Thanks

1 Like