How create column names to a data table

I have to create a new store some data from another datatable. Before that I need to add column names into that datatable. how to do do it.

Anyone please help me.

dataTable.Columns(0).ColumnName=“new_ColumnName”

1 Like

Use Add data column activity

Thanks
@rifnanahas

1 Like

I have to create 10 column names…Is there any another way to create all together?

you can use build data table!

1 Like

can you explain it with help of workflow?

1 Like

sure i’ll send you sample

1 Like

builddatatable.xaml (6.5 KB)

please try the attached flow for creating a dynamic datatable
@rifnanahas

1 Like

columnCount = myDataTable.Columns.Count
For Each index in columnCount
myDataTable.Columns(0).ColumnName = “newColumnName”
try this

1 Like

first use build datatable activity and click on highlighted area then a pop up will open in which you have to fill your desired column name and store the output in the variable say build_Dt
image

once that is done you can copy the data from one table to other using assign activity
build_Dt = ur_Dt.copy()

Excel.zip (18.1 KB)

1 Like

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