Hi Guys,
Does anyone know how to add a column after or before the specific column in DataTable?
Hi Guys,
Does anyone know how to add a column after or before the specific column in DataTable?
Hi @kuppu_samy
Use insert delete column activity and based on the index value you can create column
Thanks
Ashwin.S
Yes @AshwinS2 , I can do but I have 50,000 of data in the other columns. I don’t want to delete the existing data.
You can use Invoke method activity and pass the parameters in the Properties.
You can use the column index number as an argument.
Hi @kuppu_samy
For example, if you have a DataTable is named dt,
and you hope that a new column “Name” be set before a specific column “Price”.
dt.Columns(“Name”).SetOrdinal(dt.Columns(“Price”).Ordinal)
or if you hope that a new column “Name” be set after a specific column “Price”.
dt.Columns(“Name”).SetOrdinal(dt.Columns(“Price”).Ordinal+1)
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.