what is the script(qtp) to export and import the datas from
MSaccess to Excel sheet.if anybody know plz tell me.

Answers were Sorted based on User's Feedback



what is the script(qtp) to export and import the datas from MSaccess to Excel sheet.if anybody kno..

Answer / e.g.g

hi, I'm you may export the access's datas into the QTP
datatable first,import it into the excel second.
haha,this maybe a foolish method -_-||

Is This Answer Correct ?    3 Yes 1 No

what is the script(qtp) to export and import the datas from MSaccess to Excel sheet.if anybody kno..

Answer / king

Set a=createobject("adodb.connection")
Set b=createobject("adodb.recordset")
a.provider="microsoft.jet.oledb.4.0"
a.open "E:\raju\login.mdb"
b.open "select * from login",a
i=1
Do while not b.eof
If not dialog("Login").Exist(2) Then
invokeapplication "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe"
End If
dialog("Login").WinEdit("Agent Name:").Set b("User
name")
wait(1)
dialog("Login").WinEdit("Password:").Set b
("password")
dialog("Login").WinButton("OK").Click
datatable.SetCurrentRow(i)
datatable(1,1)=b("User Name")
datatable(2,1)=b("password")
wait(1)
If dialog("Login").Dialog("Flight
Reservations").Exist(1) Then
dialog("Login").Dialog("Flight
Reservations").WinButton("OK").Click
datatable(3,1)="Fail"
dialog("Login").WinButton("Cancel").Click
else
datatable(3,1)="Pass"
Window("Flight Reservation").Close
End If
i=i+1
b.movenext
Loop
datatable.ExportSheet "E:\raju\db.xls",1


i think this is working properly

Is This Answer Correct ?    2 Yes 1 No

what is the script(qtp) to export and import the datas from MSaccess to Excel sheet.if anybody kno..

Answer / devb

If you want to fetch data from access database and write into excel, the easiest way is to write VBA code. In macro directly connect to access database, fetch data into recordset and using range.copyfromrecordset save the data into excel sheet. No need to involve QTP.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.

0 Answers  


what is meant by descriptive programming?

2 Answers   Wipro,


hi gavasker i want how to merg OR's in QTP 8.2 by QTP Plus

1 Answers  


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

0 Answers   CTS,


Explain the concept of object repository & how qtp recognizes objects?

0 Answers  






Explain about Standard output value, Text output value, database o/p value, Xml O/p value, Xm o/p Value

1 Answers   TCS,


What are default add-ins in qtp?

14 Answers   Semantic Space,


During execution, how can we capture the data from the pop- up, ie. when any popup comes with some numbers written on it, then how can we capture the value/number that is coming on the pop-up and save in the dynamic file/or other file, even when the run is going on.

2 Answers   Wipro,


What is the difference between the keyword view and expert view?

0 Answers  


please write a script to find the text in a application. Note: i dont know the location of that text where it is located. just like negative testing.

2 Answers   BSL,


Can we write class for vb script in Quick Test Professional?

2 Answers   JPMorgan Chase,


What is checking bitmaps?

0 Answers  


Categories