Read excel using qtp descriptive programing
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / 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 |
LINUX environment supports QTP or not? LINUX environment supports QC or not?
hi i have one issue while selecting weblist i want show one particalur item in weblist .ex one weblist they are monday to sunday i want show the reporter like thurday in particular weblist can you help me about this thanks balaji
Can anybody post some real time scenario in qtp? please its very urgent.
I want to execute 1st row of the local sheet and 3rd row of the global sheet parellely. write script to execute
can any body help me out by providing links/material for descriptive programming in QTP otherwise can you post decriptive programing based interview Questetion&ans. plz help me out . i need it.
What is output value?
How to Identify broken links in QTP
How to identify whether a web page exists or not without using Browser(" ").Page(" ").Exist?
What is iteration?
anyone can explain about "Hybrid framework" in QTP
write a script to close all open browser in qtp except one browser whose name is xyz
In an(AUT) web application their are two frames as fraMain and fraFooter. Both the frames contain link which needs to be retrieved at a single step. I tried it using "Regular Expression" as fra.* but QTP doesn't recognize the object. So Plz help me out to get resolve the problem:-)