Assign : Cannot perform '=' operation on System.String and System.Int64


#1

Hi everyone:
in an excel application scope, i use assign to do selection: datatable.Select (“columnname1=‘shanghai Mcd company’ and account = 709457752725”), it works quite well.

but when i add another similar sentence like: duizhang.Select (“columnname1=‘shanghai Mcd company’ and account = 709457752725 or columnname1 = ‘beijing Mcd company’ and account = 687357752727”), it is wrong, and the error shows:Assign : Cannot perform ‘=’ operation on System.String and System.Int64.

could sb tell me the reason? many thanks.


#2

convert(columnname1, ‘System.Int64’) = 709457752725


#3

thank u very much, and could u tell me more detail, please? how do i use this sentence in uipath? put it in “assign” activity or?


#4

@vvaidya thank u very much, could u tell me some detail? how do i use this sentence in uipath? put it in “assign” activity or? i use the above"datatable.select……" sentence in “assign”,


#5

did you try this way?

duizhang.Select (“columnname1=‘shanghai Mcd company’ and convert(account , ‘System.Int64’) = 709457752725 or columnname1 = ‘beijing Mcd company’ and convert(account , ‘System.Int64’)= 687357752727”)


#6

@vvaidya hello, i see, thanks, but when i tried like what you write, uipath assign activity shows:Input string was not in a correct format. and when i put it in write line, it says:Invalid type name ‘system.int64’. do u know how to solve this? many thanks.


#7

Did you try this way converting int to string then converting column to int64

duizhang.Select (“columnname1=‘shanghai Mcd company’ and account = ‘709457752725’ or columnname1 = ‘beijing Mcd company’ and account = ‘687357752727’”)


#8

@it works, thank u so much