String Comparision failing
I am comparing the data(text) stored in an excel sheet with the value got from a web application.
From the WebEdit box i am getting the value at run time using GetROproperty and store it in a variable, say applicationtext.
I also read the data from excel and store it in a varibale, say exceltext.
I need to compare applicationtext & exceltext.
I have pasted the exact text from the application into the excel sheet, but the strcompare is not returning true.
The text length is 363 characters
I used Msgbox for exceltext and it displays only the frist 241 characters of the string, but the length
(using the statement Msgbox Len(exceltext)) it shows as 363 characters.
How is it that the Msgbox displays the lenght as 363 characters, but shows only 241 characters of the data read from excel?
When the Msgbox function is used for application text, it displays the whole text(i.e the 363 characters) and the statement Msgbox Len(exceltext), shows the correct lenght of 363 characters.
MsgBox has a display limit and will never display the full string if the string is too large. You need to use the print statement
Also new line characters in Excel are different from new line characters in usual text. Excel uses vbLf where as normal text file uses vbCrLf