Reading Excel Files

I have an excel file with say 3 columns which is stored as a datatable. I want to read column 1 and column 3 and display it as an output using write line activity. How do I read those specific columns?

1 Like

Buddy @ui_dev
Welcome to uipath community buddy
kindly follow the below steps that could help you resolve your issue buddy

  1. use excel application scope to open the excel, pass the excel file path as input to this activity
  2. inside the excel application scope use a read range activity, by mentioning the sheet name and range as “”
    make sure that the add headers property in read range activity is enabled and get the output from this with a variable named out_dt of type datatable
  3. use a for each row loop to iterate through each datarow in the datatable out_dt, pass the input with out_dt to this activity
  4. inside the for each row loop here comes the answer for you buddy, use two write line activity with first line like this
    row(“column1name”).ToString
    and
    second write line activity as
    row(“column2name”).ToString

Thats all buddy you are done
Kindly try this and let know buddy whether this works or not
Cheers @ui_dev

Did that work buddy @ui_dev

Hi @ui_dev

I have created workflow based on your requirement run and check you will get the solution.

ReadColumnData.zip (17.3 KB)

Worked. Thanks!

1 Like

This works too. Thanks.

Cheerss buddy
Keep going
@ui_dev

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