Remove only column names from datatable without removing the data

Hi devs, pls anyone with logic to only remove the column names from datatable without removing datatable.Remove datatable activity will not work here cause I don’t want to remove data with the columns just the columnnames.Regards

What do you mean remove the column names? Columns must have names.

A datatable has internally DataColumns. DataColumns do have names. This internally structure we do not touch.

Maybe you elaborate on the motivation why the columns should be dropped

1 Like

image
Would like remove all these column names so as to append to another datatable

Hi @stanstilo ,

You can use Filter DataTable for removing columns.

we can merge two datatables with the merge datatable activity. Ensure that it will have the same columnstructure (and also names - otherwise rename it)

On excel base we use append range or write range without addHeaders option

when columnnames are part of the datatable (e.g. first row) we remove the first row e.g. remove datarow activity

HI @stanstilo

You can try with Merge Data Table activity

Regards
Gokul

HI @stanstilo

Some thing like this

Dt1 structure look like this

Dt2 structure look like this

Merge Data Table

image

Output

image

Regards
Gokul

In some cases, the columns will not have the same columnstructure, in such case what should be the workaround please

harmonizing .e.g renaming / removing unneeded cols.

We gave you some building block above. Before resulting in a long ping pong thread:

share sample data
share expected output

1 Like

dt1 - Name Age Status
mark 20 pending
smith 22 completed
mary 15 pending

dt2 - Name Age Status Amount Comment
George 13 completed 400 Airbag purchase
Jamain 33 pending 200 Grocery

Output - mark 20 pending
smith 22 completed
mary 15 pending
George 13 completed 400 Airbag purchase
Jamain 33 pending 200 Grocery

HI @stanstilo

You can try with Merge Data Table

Check out the Sample XAML file

Common&UnCommon.xaml (13.4 KB)

image

Regards
Gokul

1 Like

Alright thanks Devs for your contributions. Regards

Have you checked this XAML file? @stanstilo Have you got the output?

If yes, Kindly close this topic by mark as solved

Regards
Gokul

1 Like

Rename the columns so they match.

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