How to Compare the 2 xl-sheets in QTP? ple write the vb
Script for the comparison?

Answer Posted / rentalavdml

Set objExcel = CreateObject("EXCEL.APPLICATION")
objExcel.Visible = True
Set objWorkbook1= objExcel.Workbooks.Open("C:\Documents and
Settings\user\Desktop\sriya1.xls")
Set objWorkbook2= objExcel.Workbooks.Open("C:\Documents and
Settings\user\Desktop\sriya2.xls")
Set objWorksheet1= objWorkbook1.Worksheets(1)
Set objWorksheet2= objWorkbook2.Worksheets(1)
For Each cell In objWorksheet1.UsedRange
If cell.Value <> objWorksheet2.Range
(cell.Address).Value Then
cell.Interior.ColorIndex = 3
'Highlights in red color if any changes in cells
Else
cell.Interior.ColorIndex = 0
End If
Next
set objExcel=nothing

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does any one worked on JIL Emulator , Testing with QTP(automation). Trail Version of QTP is not identifying the child objects of JIL emulator, Can any one help me out ,

1376


how can i pass a "automation script" as a parameter in a function give me need full suggestion thank inadvance

1424


For the below written code , i want to be stop the loop (ex:10 times), but it is focusing to first line of the code & generating error. vbwindow("vbname:=frmMain").Type micAltDwn + "6" + "2" + "D" +micAltUp 'wiil open the particular window in application vbwindow("vbname:=frmDeduction").vbbutton("vbname:=cmdNew").Click DataTable.ImportSheet"F:\QTP VBScript\Form 26-1.xls","Deduction",Global RowCount = DataTable.GetSheet("Global").GetRowCount i=RowCount For j =1 to i 'vbwindow("vbname:=frmDeduction").WinObject("nativeclass:=DataComboWndClass","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type DataTable("Name", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 187").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type DataTable("Section", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 216").Type micTab vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtOfPay").Set DataTable("Amount_of_Payment", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Set DataTable("Amount_PaidCredited_Date", dtGlobalSheet) vbwindow("vbname:=frmDeduction").VbEdit("vbname:=txtAmtPaidDate").Type micTab vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micF4 vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type DataTable("Deduction_is", dtGlobalSheet) vbwindow("vbname:=frmDeduction").ActiveX("acx_name:=DataCombo","abs_y:= 316").Type micTab vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdSave").Click DataTable.SetNextRow Next vbwindow("vbname:=frmDeduction").VbButton("vbname:=cmdClose").Click

2638


Explain more about the Test Fusion Report of QTP?

603


explain structured testing? plz guys with exp. do answer

1406






I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=", Second button "html id:=btnSave "outerhtml:=", Third button "html id:=", outerhtml:=",

1352


In qtp, how you can use xpath to identify objects?

612


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1705


How to analyzing test results using quicktest professional?

564


How can i use virtual objects? If have i created one new virtual object in a virtual object manager by following instructions.

1442


Dis advantages of XML checkpoint ?

1577


Whar are the challenges do we face while testing web based applications using the automation tool QTP or any??

1634


There is an excel file of 1 to 100 sheets how you will iterate through it?

526


1 Folders in VSS 2 In navigation script there are 100 script i want to run first 50 and 37th script also not needed to run how to do this 3 What is navigation script,Driver script, business script what we are loaded in this script 4 use of resource tab 5 Difference between verification and validation give real scenario example 6 file scripting object when to use it 7 what are the problems you are faced while testing web application 8 difference between expert view and keyword view 9 difference between QTP 8.2 and QTP 9.2 navigation frame work please answer these questions from real time working people as early as possible

1607


Can any one say what exact diff between test->parameters, action properties-> parameters. after defining the parameters in test->settings, how can we access those parameters.(i know how to use action prop parameters)

1620