adspace


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

hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com

1943


HOw to add the recovery file at runtime to the test file .

2295


how to use the regular expression for the below code-- swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:56" There is a tree view window of the folder's ie Medication- >Pharmacy(sub folder)with 56 as count of records...The records can be different or if no records present in the specific folder..then it show "Paharmacy:-no records".Whe i record at the first time .....and try to rerun the same script with different records count say "pharmacy:800"..qtp is not regnizing it...therefore i want to user regular expression..but donot now how to use it and where to use...i have tried.... swf("application name").swftreeview ("Treename").select"Medication;Pharmacy:\*"..but it s of no use..plz help..me

3012


Hi friends I need to know about jubula automation tool. Is anybody know in bangalore where jubula tanning class is going on do let me know. Its urgent for me to learn that tool please help.

3423


What is the new version of qtp which is recently released in the market?

1162


any body can you help me what is the script to automate an comand promt

2570


Hybrid framework supports Descriptive programming. Is it true?

1236


Define Environment Variable in UFT and its uses?

1145


what is actually contain test report? can anybody post the test report

2095


Hi friends did any budy attend accenture system test for qtp? if any budy pls drop questions.not only accenture any other mnc company which you attended system test(QTP)?it may helpful to others also

2398


can any body plz help by sending the qtp docs and qtp ppt's? this is my mail id:murali.padeti@gmail.com

2327


I want to do Certification course in QTP. For this I request you to suggest the best Tutorial in PDF format. Hence, if possible, kinldy mail PDF file to my mail-ID: sushmapokhriyal79@gmail.com

2024


i am looking job in perfomance testing using Loadrunner any one help me a project plz......?(Chandana) chs_29@rediffmail.com

1953


Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ

2114


Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)

2561