Seperate excel columns INTO one datatable

image
hi, how can i extract seperate excel columns into one datatable? pic as above.

2 Likes

Can you clear the inquiry please! do you mean you want to exctrac the column c into different data table ? @pitaty

cheers :smiley:

Happy learning :smiley:

1 Like

@pitaty

  1. use Read Range activity to read the data from excel file and will give you output as DataTable and say ‘inputDT’.

  2. And then below expressions to separate required columns from DataTable.

     newDT = inputDT.DefaultView.ToTable(False,"Name","Age","Sex")
    
  3. And then use Write Range activity and pass newDT write into Excel file.

5 Likes

i want to extract column “A,B,D” into one datatable.

2 Likes

Works. Thank you !

3 Likes

image
what’s this meaning? i wrote as the same as you mentioned :
image
Please help

@pitaty

Here dt variable is of type System.Data.DataTable or not ?

yes. dt is of type System.Data.DataTable

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