Restrict excel file read by column

I am looking to import an excel file into UIPath as a datatable. What I need to do is read all the rows that are filled, but restrict the read to a certain column. As such, I want to read all the rows between Columns A to E. I can’t figure out what range I need to specify to do so.

1 Like

1.Excel application scope
2.Read Range will give all the data in datatable
3.For each row will iterate through datatable use Get row item and pass the only those column name in the property “column name” that you want to read and get the item from it.

Thanks for the response. Could you tell me what the syntax for the following fields is supposed to be?

I’ve looked at the documentation, but it doesn’t tell me anything about what I need to write there. Just what it does. I am trying to specify the range of columns from A to E. However, when I put “A:E” under column name, I get a null reference error. Am I only able to extract data from one cell at a time, and then have to build it together?

You can’t mention the range here you just need to pass the column name like “A”
and do the same for other
drop another 4 get row item activity and pass column names “B”, “C” and so on

side note: make sure you checked “add header” property of "Read Range

Looks like i understood in other way :hear_no_evil:
to choose the range of column to read you can specify directly in read range activity

I did do that initially. The problem with that is, that I need to read all the rows, but only the data between Column A and Column E. So, I basically want to take an excel file, and create a data table with x number of rows and 5 columns.

x = number of rows in the original excel file itself

I don’t get it.:wink:
It will read all the data between A and E for X number rows.
what more you try to achieve here.
Or can you attach excel with sheet 1 your data and tell me what data you need in sheet2.

Dummy Data.xls (27 KB)

The original data is in “Worksheet”
The data I want to extract is in Sheet 1.

When I put the range as “A1:E1”, I only get one row of data. If I put just “A:E”, I get a null pointer exception. I just need to know what range I need to put to do it. I’m really not sure of the syntax here.

Here we go…
insercolumn.xaml (7.5 KB)