how to compare two excell sheets by using vbscript??
Answers were Sorted based on User's Feedback
Answer / maruthi ram
Set objExcel = CreateObject("Excel.application")
objExcel.Visible = True
Set objWorkbook1 = objExcel.workbooks.open("D:\maruthi1.xls")
Set objWorkbook2 = objExcel.workbooks.open("D:\maruthi2.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
msgbox "value is different"
Else
msgbox "value is same"
End If
Next
objWorkbook1.close
objWorkbook2.close
objExcel.quit
set objExcel=nothing
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / deven
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook1= objExcel.Workbooks.Open("E:\Deven1.xls")
Set objWorkbook2= objExcel.Workbooks.Open("E:\Deven2.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
msgbox "value is different"
Else
msgbox "value is same"
End If
Next
objWorkbook1.close
objWorkbook2.close
objExcel.quit
set objExcel=nothing
| Is This Answer Correct ? | 2 Yes | 1 No |
why can't you use excel directly in qtp. why we want to import excel data into Datatable.
Can we directly start working with QTP without any knowledge on WinRunner? (After getting trsining on QTP)
Do you have any knowledge about Business Processing Testing in QTP
In QTP whether is it possible to call a function from one action to another action?
hou can we use vb script in qtp could u tell me breafly
i have written some lines of code today..tommorow some lines of code deleted in middle of that code..how to handle this type of script
I have written some script in QTP and i added those objects in Object Repository. All written script has been executed successfully. After few days when i tried to execute the same script i got error message "objects not found in Object Repositiry". How can we solve this issue?
can we change the name of a check point? when will you start writing testcases? do you follow any methodology for writing test scripts? qtp is key word driven testing or data driven testing?
How to record object in runtime. I am testing one Image website in which every time image change on home page.so if i records the image list but during running image get change, and QTP gives error
How do u fetch data from a database ?
Give the syntax to load function at run time.
What is the difference between link and hyperlink?