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

What is the difference in the global and action sheet in qtp?

0 Answers  


Explain synchronization types in QTP

2 Answers  


If a script has a local repository and also uses a shared repository, which repository will QTP use first when searching for an object during playback?

3 Answers  


write a function to read the items from Combobox of Flight Reservation application and save in excel.

5 Answers  


how to get no.of non empty rows in a excel sheet through vb-script

2 Answers   HP,






How do u write a regular expression for date (dd/mm/yyyy) field?

10 Answers  


When should I use smart identification?

0 Answers  


Diff B/w Webserver and Client Server

2 Answers  


after click on compose mail how can we attached a file in qtp with vbscript code

0 Answers  


Tell me the QTP Advantages and Disadvatages ?

1 Answers  


which is the easiest way you can send the QTP test results to Client if he want to see the screenshots when the results are failed?

1 Answers   CTS,


If you are testing a web application then what will you test in that application?

0 Answers   Infosys,


Categories