Forgot to add Looping process:
row_count = tableobject.rowcount
Note:
1. get total number of columns in the table. (column_count)
2. Note which cell to start from (usually first row will be used
for naming each column, if so, you have to skip it in the looping.
Following example assumes this scenario and initializes looping
variable accordingly)
3. Get each cell data from excel sheet.
Note: This loop first completes all the rows in a column and then
moves to next column to repeat the same.
for i = 1 to column_count
for j=2 to row_count
If(NOT (tableobject.getcelldata(j,i) = cell data from excel)) then
ncount = ncount+1 'counter to know how many cell values
did not match
end if
Next
Next
I have not addressed how to get cell data from excel sheet. This you
have to figure it out.
Hope this helps.
Nimith
On Oct 9, 6:53 am, savy <[email protected]> wrote:
> Roman has already answered first part of your question.
>
> For the second part, get the table object and loop through it to get
> each cell data (using getcelldata(row,column)).
>
> While you get each cell data you can compare that to corresponding
> excel cell data.
>
> Nimith
>
> On Oct 9, 6:47 am, Roman Zilber <[email protected]> wrote:
>
> > Browser("creationti me:=3").Close
>
> > On Thu, Oct 8, 2009 at 5:10 PM, venkata bala subramanyam <
>
> > [email protected]> wrote:
>
> > > Hi friends,
>
> > > I faced questions in an interview?Please clarify the answers for me.
>
> > > 1) 4 browsers opened.I would like to cloes the latest browser which is
> > > opened by us.?
> > > I know upto based on creation time shall we close the browsers?
> > > If Browser("creationti me:=0").exist then
> > > Browser("creationti me:=0").close
> > > End if .
> > > i think this scipt for only one browser is opened.
>
> > > 2)How can we get the data from Web table?
>
> > > I think by using Getcelldata.I would like to get entire table data and
> > > compare to the excel data.How can we get it..
>
> > > Little bit urgent ,
>
> > > Thanks & Regards,
> > > --
> > > Venkata Bala
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
-~----------~----~----~----~------~----~------~--~---