Delete Column

Hi,
I want delete Particular column using column name is (“Actual Profit %”,“Expected Profit %”).
Thanks and Regards…

Hi @MD_Farhan1

Use Remove Data Column activity

1 Like

Hi @MD_Farhan1

Use the remove column activity and pass the column name and the data table name that you want to delete from

Regards

1 Like

Hi @MD_Farhan1
image

Hope it helps!!

1 Like

@MD_Farhan1

filteredDataTable = YourDataTable.Clone() ’ Create a copy of the original DataTable structure
filteredDataTable.Columns.Remove(“Actual Profit %”)
filteredDataTable.Columns.Remove(“Expected Profit %”)

1 Like

Hey @MD_Farhan1

Check this Datatable post for various datatable actions explained:

Cheers

Steve

1 Like


I Got above error…

@MD_Farhan1
Can you send snippet of the activity you used.

Hi @MD_Farhan1

I hope you have given both the column names in the same activity.

Remove data column works only for a single column at a time so if you want to remove 2 columns then please use 2 remove data column activities and that works!!

Regards

1 Like

Hi @MD_Farhan1

Thank You

Happy Automation!!

1 Like

Hi,

I Delete one column . then i delete second column is got error.


Regards.

Can you send the screenshot of the flow after first Remove Data Column activity @MD_Farhan1

Regards


This is my flow.

HI @MD_Farhan1

I hope the excel contains 2 columns with the same column name so that’s the reason this error is being arised. Please check in you excel sheet.

Regards

Hi @MD_Farhan1

After single read range activity you can directly use the remove data column activities as shown below and after removing both the columns you can directly write the data table to excel as shown below

Regards

1 Like

Hi,
Before Remove Column look live below

After Remove Column Look Like Below

Below My WorkFlow

Hi @MD_Farhan1

->Don’t use that many Write Range Activity.
->First you complete all the operations that need to be done on that data tables and at last you use the write range activity.

Regards

still not delete come with last column.

Hi @MD_Farhan1

Can you share the workflow and the Input Excels so that I will provide you with the changes that required.

Regards

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