Read only filtered excel data

Hi friends

I will get excel in filtered format through email.
I have to read only the filtered data.

when i use read range its taking all values,including hidden values.
do you have any idea.

i have read only the below. Filtered format.
image

but read range is reading all hidden values.

image

i cant filter data table after reading the file, because i dont know the filtering conditons.
only sender knows it, so he ll filter it in excel and send it to me.

ReadRange activity has UseFilter option…

Cheers

Hey,
For this kind of cases, I’m used to work with Excel Application Scope with a Invoke VBA inside. And I’m using VBA code to extract my filtered Data.

But with UiPath you can Read Range to get all the content and then use a Filter Data Table to remove the lines that you don’t want.

Both work, it just depends how you are fine with VBA :slight_smile: Enjoy !!

Hi thanks, could you send me the VBA code , to read and put into data table.

I cant use read range all and filter because i dont know the filter condition, only sender knows it.

To use the filter on the 2nd column with a value at SomeStringValue or Empty :
ActiveSheet.Range(rowColRange).AutoFilter Field:=2, Criteria1:= "=SomeStringValue", Operator:=xlOr, Criteria2:="="with rowColRange as your selected range.

For the datatable type, just create a Table : Dim SomeTableName() As String
If you are not used to VBA please refer to the documentation.