Split data table based in two based on column Name

Hi,

I have a datatable with three columns. I want to get these into three separate data tables with one column each. How do i go about this?

@tREX

One option could be to do it with DevaultView

dt1 = dtOrig.DefaultView.ToTable(False,{“Col1Name”}
dt2 = dtOrig.DefaultView.ToTable(False,{“Col2Name”}
etc.

another option would be filter datatable (keep Column setting)

In case of many columns we would dynamize the splitting

  • within a for each activity
  • adding the the different split datatable to a list

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