how to delete selected multiple columns in an excel file
i want to delete whole columns not rows
May I know how many columns you have and how many you want
Because we can use DefaultView based on the number of columns we want
Cheers @Sreekar_Mulinti
like 4 to 5 columns which are not parallel to each other they are at the middle of the needed files
Use the below expression to select the column you want in your datatable!
dtYourDatatable.DefaultView.ToTable(False,“ColumnName1”,“Columname2”…).CopyToDatatable
Regards
Then fine
We can use default view method like this in a assign activity
Mention as False if you want all the records in those four columns including duplicate
Or if you want to delete the duplicate and have only the unique values then mention as true
And mention the column names you want to retrieve
dt = dt.DefaultView.ToTable(False, “ColumnName-1”, “ColumnName-2”, “ColumnName-3”, “ColumnName-4”)
Cheers @Sreekar_Mulinti
Hi!
Try this!
Regards,
NaNi
thank you for respone
Is there any further queries on this topic
Cheers @Sreekar_Mulinti
can we add index names instead of column names in filter data table
will ping if any queries
Hi!
Just mention the index of the column inside the column.
Reference:
Regards,
NaNi
i didnt get the headers after trying this
Well that won’t delete the headers at any point
Can we check once whether Add Headers is enabled in Read range activity we have used to read the data
And make sure you have mention the exact ColumnNames
Cheers @Sreekar_Mulinti
add headers was selected in read range
but still not getting headers
Fine
I would suggest to change the ColumnName as it is always good to avoid space between words in a ColumnName
Have an underscore between words in ColumnName like this
Sold_To_Name
Even you can see a red line below to that in editor
Change then and give a try
Cheers @Sreekar_Mulinti
but in the excel file the header contains spaces no underscore