Importing Exce data into QTP

This below Qtp scripting example shows how to extract data from an excel sheet into qtp data table.
dim Q_app ‘As QuickTest.Application
Set Q_app = CreateObject (“QuickTest.Application”)
Q_app.Launch

Q_app.New
Q_app.Visible = true
msgbox “Application opened..”

Now importing test.xls (excel file) first sheet into first sheet of qtp data table.

Q_app.Test.DataTable.ImportSheet (“C:\test.xls” ,1,1)
Q_app.Test.DataTable.Export (“c:\name-runtime.xls”)
msgbox “this is open”
q_app.Test.SaveAs “c:\test1″

q_app.visible = true
q_app.quit

set q_app = nothing

One thought on “Importing Exce data into QTP

  1. Pingback: telescopic ladders

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>