Read excel using qtp descriptive programing

Answer Posted / debashish

‘read excel sheet
dim xl,wb,ws
set xl=createobject("excel.application")
set wb=xl.workbooks.open("H:\asis excel.xlsx")
xl.DisplayAlerts=False
set ws=wb.worksheets("sheet1")
r=ws.usedrange.rows.count
c=ws.usedrange.columns.count
For i=1 to r
v=""
For j=1 to c
v=v &" "& ws.cells(i,j)
Next
msgbox v
'msgbox"-----------------------"
Next
'For i = 1 to r
' For j =1 to c
'msgbox ws.cells(i,j)

' Next
'next
wb.save
wb.close
set xl=nothing

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

3301


What is the diff between image and bitmap check point?

681


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

1946


when will you do debug your script? and explain that process?

1548


hou can we use vb script in qtp could u tell me breafly

1850






What are the features supported by UFT?

743


What are the different attribute used with regular expression?

614


what are the issues we will get when there is migration from QTP 8.2 to QTP 10.0? Is there any problem in executing scripts of 8.2 on 10.0?

1542


How to use descriptive programming?

731


How can you identify the browser and its information using the qtp script?

668


How to use transactions in qtp?

636


What are the differences between table and db checkpoints?

627


Approach for Installation,comaptibility,system testing

1804


What is QTP testing process?

702


How is test case write?

664