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



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

Answer / 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

More QTP Interview Questions

how many wayes we do the parameterization?

1 Answers  


What are the views available in qtp?

0 Answers  


More details about keyword driven technique in QTP

1 Answers   TCS,


In Manual testing , can u prpare bug report in TD?

1 Answers   TCS,


how to record a word doc using qtp i.e open a word doc,type something and save the doc can someone send me the code.

3 Answers  






MANUAL TESTING, AUTOMATION TESTING QTP,QC , Load Runner , SELNEIUM ONLINE TRAINING

0 Answers  


how to post xml data from QTP scripts to any application?

0 Answers  


What are the recording modes in wave event?

0 Answers  


Explain the difference between data driven testing and parameterization ?

0 Answers  


how to explain a claims and insurance project?

0 Answers  


Create an Excel file and pass the values from Flat File? (for ex:data1.txt,data2.txt )

2 Answers   FIS,


How can we translate the steps between the Keyword and Expert Views?

1 Answers  


Categories