How do I read two particular columns?

Hi All,

I have an Excel file with 99 columns. I want to read two particular columns “Vendor” & “Name 1”. There are 4 duplicates columns of “Name 1”.

How do I read these two columns and write it in another Excel file ?


If Column names are duplicate then you should have reliable index of the column.

If you have the index then, use Read Range activiity → Uncheck Add headers

This will return you a datatable with generic column names like Column1,Column2 etc.

Use assign activity to get 2 columns only. Here Column numbers you can change as per your index.

dtOutput will be your output table with two columns. Write it back to desired excel.

Ashok :slight_smile:

Can you please provide the xaml file ?


Could not share from the laptop I have. It’s just two activities logic. Give it a try.

Ashok :slight_smile:

Hey @uio

Use Filter Datatable Activity after read range,

goto configure → select Output columns → Keep → Write Index of the columns (Column position - 1) that you need in the output table.

You will get the expected output

Ajay Mishra

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