Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Excel Comparision
#3
Not Solved
Do the following. Create excelobject then create one object for each workbooks. Then find the row and column count for both of the files. If those counts do not match then the data aren't equal. Either way do a for loop and you compare data cell by cell.
Do a nested for loop if you want it to go left to right...IE
(1,1)(1,2)(1,3) so on
Code:
usedrowoflist1 = objWSlist1.Usedrange.Rows.Count
For i=2 to usedrowoflist1
    For j=1 to usedcolumnoflist1
            If objWSlist1.cells(i, j) = objWSlist2.cells(i,j) Then
                                Do whatever you have to do if passes.
                    Else  
                                Do whatever you have to do if fails
                        End If
        Next
Next
Reply


Messages In This Thread
QTP Excel Comparision - by gautamwin - 08-19-2013, 01:58 PM
RE: QTP Excel Comparision - by basanth27 - 08-19-2013, 02:30 PM
RE: QTP Excel Comparision - by Novemberrain81 - 08-26-2013, 03:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Toungue String comparision using Data sheet:- inconsistant behaviour. chetan-24 0 1,725 10-07-2008, 04:23 PM
Last Post: chetan-24

Forum Jump:


Users browsing this thread: 1 Guest(s)