Error when filtering data in excel

studio

#1

Hi Team,

Please be informed that i am going through 9th chapter i.e., “Excel & Data Tables” in UI Path academy training & when i try to filter the data from any excel i am facing the exception error “Object must be of type Double”.

Request you to help me out on this

Regards,
Suhas


#2

@Suhas92 Change variable type to double


#3

Thanks Indra,

I tried changing the variable to a double,. However I still cant filter the data.

Can you please share an example “XAML” if you have any so that I can compare and make the necessary changes to mine.

Thanks in advance

Regards,
Suhas


#4

@Suhas92 Can you share your workflow


#5

Hi Indra,

I can’t upload my workflow since i am a new user. Can you share me your alternate e-mial ID so that i can share my workflow with you.

Thanks in advance.

Regards,
Suhas


#6

In your “get row item” activity (if you’re using one), change the output variable to a double. If required you can then use an assign activity to convert to another variable, for example if you need a string instead you can assign StrVariable TO DblVariable.ToString

Hope this helps?

UI Path tends to see any number format in excel as a double, no matter what cell format is in the spreadsheet.


#7

Hi @KEntwistle,

I am using the “Read Range” & Filter data table" activity as shown in the Ui Path tutorial & during the filter table activity i am facing this error.

so can you share some light on this

Many thanks!!

Regards,
Suhas


#8

@indra

I have attached my workflow.

Main.xaml (13.4 KB)


#9

@Suhas92 can you attach Excel file


#10

@indra,

here is the excel

Employees300 orig.xlsx (26.9 KB)


#11

I have the same problem! May I know is there any solution? Thanks!


#12

Hello @Suhas92 and @annalyy

You have to change the ‘Value’ field inside your Filter Wizard to 10.0 (as a double) instead of 10 (as an integer).

Hope this helps.


#13

Thanks @stevengoehler
I am not sure where to change the "Value field in the filter wizard.
From the properties panel or the function box, i cannot locate where the value field is…
Thanks again!!!


#14

Hi @stevengoehler,

Thanks a lot, I changed the value to to double & it works.:blush:


#15

Hey @annalyy,

Its the value field in the filter wizard. in your “filter wizard” (1st) screenshot change the 10(intgr) to 10.0(Double) then the workflow will work.

Have Fun!!


#16

Thanks! It works now!!