How to export QTP results to an .xls file?

Answer Posted / sathish

It is not possible to Export the Results Directely into
Excel File,but it is possible to Export the Results into
Runtime Datatable.

EX:
datatable.AddSheet "venu"
datatable.DeleteSheet "Global"
datatable.DeleteSheet "Action1"
datatable.ImportSheet "C:\Documents and
Settings\Administrator\Desktop\Mallik.xls",1,"venu"
For i=1 to 9
datatable.SetCurrentRow(i)
systemutil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
Dialog("Login").WinEdit("Agent Name:").Set datatable
("A","venu")
Dialog("Login").WinEdit("Password:").Set datatable
("B","venu")
Dialog("Login").WinButton("OK").Click
Window("Flight Reservation").WinMenu
("Menu").Select "File;Open Order..."
Window("Flight Reservation").Dialog("Open
Order").WinCheckBox("Order No.").Set "ON"
Window("Flight Reservation").Dialog("Open Order").WinEdit
("Edit_2").Set datatable("C","venu")
Window("Flight Reservation").Dialog("Open Order").WinButton
("OK").Click
x = Window("Flight Reservation").WinEdit
("Name:").GetVisibleText()
Datatable("D","venu")=x
Window("Flight Reservation").Close
Next

Results:x values will be Printed into Runtime Datatatable
in D column

Is This Answer Correct ?    2 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between data driver & data driven and driver script?

2140


Explain how qtp identifies object?

613


Explain different checkpoints in qtp.

723


Explain calling sub procedure.

624


Explain types of descriptive programming?

591






I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error

2352


1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.

1679


Explain the types of object repository?

557


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1709


how to post xml data from QTP scripts to any application?

1504


how to create flat file datasubmission in qtp

1906


Explain the types of object repositorys in qtp?

578


What is the difference in testing a client-server application and a web application?

587


Please help me by providing the License key for QTP 9.2, at guru_aarya@yahoo.co.in Best Regards Gururaj.B

2910


Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?

1395