Read excel using qtp descriptive programing

Answer Posted / bindu

'Create Excel Object
Set excel=createobject("excel.application")
'Make it Visible
excel.Visible=True
'Open the Excel File
Set workbook=excel.Workbooks.Open("D:\excel.xls")
'Get the Control on Specific Sheet
Set worksheet1=workbook.Worksheets.Item("Sheet1")
'get rows count
a1=worksheet1.usedrange.rows.count
'get columns count
a2=worksheet1.usedrange.columns.count
msgbox a1
msgbox a2
For i=1 to a1
celltext=" "
For j=1 to a2
celltext=worksheet1.cells(i,j)
msgbox celltext
Next
Next
workbook1.close
set excel=nothing

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1553


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

783


How software tester can use constants and variables in scripts?

1848


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?

1703


Will down time for server and content maintenance/upgrades be allowed? how much?

773






How may types of defects identify application or your currently working application?pls give me answer..

1666


Mention the test steps of qtp.

676


Explain in brief about the quicktest professional automation object model?

675


If you are testing a web application then what will you test in that application?

1712


how to convert 100 into hundred repees only and viceversa

1627


Limitations in QTP?

1876


How to find the difference between 2 dates in qtp?

759


what is meant by source control?

1848


How many types of object repository in qtp?

774


What is the significance of “action 0” in qtp?

715