How to remove multiple columns in datatable using linq?

Hi,

I have data in data table.Now I need only few columns to be required from the datatable. How to remove multiple columns using linq?

@SARITHA_Masani

You can use below Activity to delete columns.

https://docs.uipath.com/activities/docs/excel-insert-delete-columns

If you need only few columns from a datatable then instead of deleting multiple columns we can get those few like this in a simple assign activity
Yourdatatablename = Yourdatatablename.DefaultView.ToTable(False,”columnname1”, “columnname2”, “columnname3”).copytodatatable()

Cheers @SARITHA_Masani

1 Like