Deleting multiple columns inside a data table

Hi,

I am trying to delete some columns inside a data table - which is the output variable from read range activity - before writing the data table into another excel. What would be best way to do that?

Thanks for your help in advance.

1 Like

@Teeven_K

You can apply filter on input data table and write output in other Excel file. You can do this in 2 ways.

  1. use Filter dataTable Activity
  2. use dataTablename.select("[Column 1] = ‘value’ AND [Column 2] = ‘value’ ").CopyToDataTable
2 Likes

@Teeven_K,

Can you please use Remove Data Column Activity. I have created one sample workflow for your case. Please check and let me know.

Delete Column.zip (9.2 KB)

Thanks,
Arunachalam.

1 Like

@lakshman, thanks a lot, I used the second one. Not really a fan of those hardcoded excel activities.

1 Like

@Arunachalam, thank you. Although, it does delete a column but it cannot delete multiple columns at a time.

@Teeven_K,

You’re Great :grinning: , But if you have an array of column names, loop that array inside that you can use this Remove Data Column Activity for deleting multiple columns.
Lakshman is already explained with Linq quey, this one for without LINQ Query.

Thanks,
Arunachalam.

2 Likes

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