How to delete specific column?

Hello:)

I’d like to delete specific column as below(Yellow Remarked) which is C:F
Could you please help for how to set properties?

image

Hi @Dorothy_lee

Remove data column will remove column from datatable and not the excel file, if you want to delete columns from excel refer this post,

If you want to remove multiple columns from datatable , please use this package (use Remove Particular columns activity)

Thanks

1 Like

@prasath_S Hello,

Thank you for your reply. I’d like to use this function on DataTable.
In this case, how to assign “C:F” columns variable as Array(String)…?
5. Remove Particular columns

Input : DataTable, column names (array(string))

Output : DataTable with columns not specified by the user

@Dorothy_lee

lets assume your datatable is dtTable1, please try this

{dtTable1.Columns(2).ColumnName.ToString,dtTable1.Columns(3).ColumnName.ToString,dtTable1.Columns(4).ColumnName.ToString,dtTable1.Columns(5).ColumnName.ToString}

give this in the column names

2 Likes

@prasath_S Thank you !!

@prasath_S hello,

Can I utilize above function for filter datatable?
I’d like to filter rows which contains ‘False’. Can it be possible?
Thank you.

@Dorothy_lee you can use filter datatable activity

or try this in assign (in left it should be datatable variable)

dtTable.select(“[yourcolumnname] = ‘False’”).copytodatatable

1 Like

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