Micro Focus QTP (UFT) Forums
QTP - Webtable().GetCellData() returns unknown symbols and spaces - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: QTP - Webtable().GetCellData() returns unknown symbols and spaces (/Thread-QTP-Webtable-GetCellData-returns-unknown-symbols-and-spaces)



QTP - Webtable().GetCellData() returns unknown symbols and spaces - lokesh8008 - 05-06-2013

I have tried to retrive the values from the web table using the Getcelldata method, but it is showing values along with blank spaces and symbols in between them. But i want it to display only the values and no spaces, extra symbols...

The symbol which is getting displayed in between the values is the small box like one which we get when we copy paste spaces..

Even I have tried replace method, but it doesn't worked out.

I am using the chrome browser for testing.

The following is the piece of code which i used,


Code:
RwCount=Browser("xyz").Page("abc").WebTable("table1").RowCount
ColCount=Browser("xyz").Page("abc").WebTable("table1").ColumnCount(1)
Print RwCount
Print ColCount
For i=1 to RwCount
    For j=1 to ColCount
        iValue=Trim(Browser("xyz").Page("abc").WebTable("table1").GetCellData(i,j))
        Print iValue
    Next
Next


Here with I have attached the results image..

Can anyone please tell me how to overcome this issue.?


RE: QTP - Webtable().GetCellData() returns unknown symbols and spaces - Saket - 05-06-2013

Replace and Trim should work here, Can you paste how you tried?


RE: QTP - Webtable().GetCellData() returns unknown symbols and spaces - sria123 - 05-10-2013

Use the replace with search string vbtab,vbcrln, vbln,vbcr,etc.. as thay may be line feed or tab, acarriage return...