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
How to break the object spy ?
Explain the concept of how quicktest professional (qtp) identifies object?
Hi I am new to QTP. can u please answer to my qus... suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid from excel1 , password is from excel2 whether the page is opened or not that checkpoint is result is should be stored in excel 3.... this qus i have faced in IBM technical round... please tell script for above query ... please please
What are the types of data tables in qtp?
unique properties of button,edit box, radio button,check box?
What is optional step in qtp? How you can add optional step in qtp?
i have doubt suppose iam purly working in manual, when i will get work to do on sql and performence testing? pls any one clarify doubt?
I have developed and executed a script successfully, and saved the same to QC. When I tried to execute the script from QC, the script is not executing. What are the possible reasons?”
what you mean by artifact,milestone...
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
How is UFT 11.5 version different from UFT 12.0?
How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))
distinguish between old version and new version QTP features.
hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.
Excel sheet having some datas and some datas present in the application (in table). How will you compare these two datas? Write code to fetch datas from Excel sheet.