Removing duplicate columns

I have took a read range and by using add data column I have added a column and by using write range I got the values in the sheet but Iam getting duplicated columns along with the column i have created. How to remove duplicate columns.
practice task 3.xaml (8.6 KB)

Hi @anjani_priya

You cold use the following expression to retain the necessary columns & ignore the rest:

yourDt = yourDt.DefaultView.ToTable(True,"Col1","Col2")

In the place of Col1, Col2 in the above expression, you can add the names of the column which you wish to retain in the data table.


Hope this helps,
Best Regards.

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