Ellen
(Ellen )
1
I have a datatable on a excel file which has a column name - id
that is is formated as standard in excel.
and I have an Id extracted from mail which is as text.
feks. excel id = 7 and mail id = 7
when i add if statement … and value … like strExcelID = strMailID
its not validating
can someone explain why?
Hi @Ellen ,
When you trying to compare the variables make sure they are of same data type if not convert them to same type .
Ellen
(Ellen )
3
in excel its standard
and in mail i fatch as string either its number
Can you try this . if any extra spaces there try to trim them .
Assign: ExcelID = strExcelID.Trim
Assign: MailID = strMailID.Trim
If (trimmedExcelID.Equals(trimmedMailID))
True:
Log Message: “IDs match”
False:
Log Message: “IDs do not match”
Ellen
(Ellen )
5
that Trim was missing 
strange that it can give big issue and i had no idea that I can use that.
oh no worries we all learn together. Is your issue resolved?
system
(system)
Closed
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.