Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Count number of rows under particular column of webtable
#1
Not Solved
Hi

How to count the number of rows under particular column of a webtable.
In my application i have a webtable its having 7 columns and 6 rows whereas under 4th column each row is partitioned into 3 rows so when i gave the rowcount of that webtable it shows maximum no. rows count.
Reply
#2
Not Solved
Hai..
There is no perticular method for row count for perticular column...
But it is possible to do like this...

Code:
s=0
for j=1 to datatable.getrowcount
datatable.setcurrentrow(j)
i=datatable.getsheet(1).getparameter(2).value
if i<>"" Then
s=s+1
End If
Next
Msgbox s
Reply
#3
Not Solved
Hi

i was talking about webtable not datatable
Reply
#4
Not Solved
The best way i found out was to keep the first row blank and use a formula in the first row as "=COUNTA(A2:A1000)". This would mean that first row always gives you the column count in current column and you can always use GetParameter and ValueByRow method to access the value. Please look in QTP help file for more details
Reply
#5
Not Solved
Hi
I exported all the links of that table to a excel sheet later i want to loop on that column in excel and very first occurence link which starts with LAUSD i want to take as input and click on that click.
I did something like this:
Code:
Set oDesc=Description.Create()
oDesc("html tag").Value="A"
Set rc = Obj.WebTable("name:=Track").ChildObjects(oDesc)
num = rc.Count()
For i=3 to num-1
tag = rc(i).GetROProperty("innertext")
'msgbox tag
linkval=tag
osheet.cells(i,11)=linkval
Rowcount =osheet.usedrange.rows.count
For y=3 to Rowcount
    val=osheet.cells(y,11).Value
  If (val="LAUSD") Then
                      
          Obj.link("text:="&val).click

                        End If
Next
Next


But it does not show any error message.What might be wrong in this?I think it takes it has a string in val variable.

Any help regarding this would be appreciated in advance.
Tahnks..
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  does WebTable Object provides a method to get column number umer830 4 13,046 07-06-2018, 09:32 AM
Last Post: vijaychourasiya0109@gmail.com
  Link in a webtable in a webtable Soulwalker 1 2,865 07-19-2017, 01:44 PM
Last Post: Ankur
  Fetching total number of records inside a webtable vidya2k2 2 3,963 06-15-2015, 02:55 PM
Last Post: venkatesh9032
  How to Delete Rows with duplicate values in 1 columns in excel thru QTP. arpan 0 2,852 02-09-2015, 08:47 PM
Last Post: arpan
  Webtable actions are not getting recorded, but ObjectSpy is able to identify webtable sahilarora2000 2 3,935 06-13-2014, 04:27 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)