Cannot read a Cell to a variable of GenericValue type

excel

#1

Compiler error is showing while reading a Cell and saving to a variable of GenericValue type.


#2

Hi,
Could you please change the variable type to string an try or please attach workflow if it doesn’t workout .


#3

The value contained in excel cell is of integer type. So while trying to get it as string, it shows run time error. The error message is “System converter cannot convert from system.double”.


#4

oh right even i had this problem earlier .
I just change the formatting of that cell to text.
Or try.


#5

I have removed cell formatting. As I am new to RPA tools I am lil confused.
I have given (CInt(myStringVariable.ToString)) in the excel cell read result box. Still I ma getting the same eror. “myStringVariable” is just a string variable with main scope. Can you please help here?


#6

Hi ,
Could you please upload workflow .


#7

UiPathTest.zip (217.5 KB)

Please find the attached workflow.


#8

Hi,
Looks like you didn’t attach excel.
I have created simple workflow and its working fine.
readcell.zip (7.0 KB)


#9

Thank you Dilip. This worked.

Just for conslusion(May help somebody):

Read the excel value to ‘UiPath.Core.GenericValue’ typed variable.
For converting to integer, use:
integerVariable = (CInt(genericVariable.ToString))