Given the excel file with the data:
col1,col2,col3
1 , 2 , 3
4 , 5 , 6
I just want to extract col2 into a datatable. The following activity instead extracts col2 and col3. How to just extract the col2?
Given the excel file with the data:
col1,col2,col3
1 , 2 , 3
4 , 5 , 6
I just want to extract col2 into a datatable. The following activity instead extracts col2 and col3. How to just extract the col2?
Use Read Column activity to read entire column.
But that gets me back an IEnumable.
So how to convert it to an datatable?
I need that type because I want to use the Write Range.
Ok got. Try below expression then.
First use Read Range activity to read the data from excel file and will give you output as DataTable and say âinputDTâ.
And then try below expression.
newColumnDT = inputDT.DefaultView.ToTable(False,"ColumnName")
Works like a charm. Thanks.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.