Delete columns using workbook activity in UiPath Studio

Hi,

I want to delete multiple columns (B and D to M)in an Excel file using Workbook activity. There is no option like “Delete Range, Delete column” as in Excel Application Scope.


image

Hi,

We have the activity called as Insert/Delete Columns you can try using that.

image

@Karunamurthy

if you are required columns are few then use the below query to get the columns

dt1.DefaultView.ToTable(False,"Member ID#","Last Name")

use it in the assign activity

Hi @Karunamurthy

You can use the Delete column activity to delete a column in a datatable.
d976aefe0c5e6df8933140dd8b60ac2df5b67e38

Hope this helps

@Shiva_Nikhil

Do I have to set any argument? It is not working. Error - Member ID# not found.

@Karunamurthy

image

dt1.Columns(0).ColumnName

before to the query use assign activity and rename the column name

after that use the query

dt1.DefaultView.ToTable(False,"Member Id","Last Name")
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.