Quality Testing

Quality is delighting customers

Wat is the script for extracting data from excel sheet to QTP

Hi friends,             

Can any one tell the script for extracting data from excel sheet to QTP.


Thanks & Regards,

R. Kamalesh

Views: 428

Reply to This

Replies to This Discussion

You can use Import method to retrieve the data from excel sheet to QTP datatable.
Or else you need to use COM.
By creating Object to excel you can fetch the data.

Thank u santhosh

Vb-Script for Excel sheet adding two numbers from two different rows in excel and  displaying output in third row

Note:always Save Excel file with .xls format then only you can access it

Option Explicit 

Dim exo,wbo,wso,x,y,z,i

Set exo=createObject("excel.application")

set wbo=exo.Workbooks.Open("path of file")

set wso=wbo.worksheet("Sheet1")

r=wso.usedrange.row.count

for i=2 to r Step 1

x=wso.cells(i,1)

y=wso.cells(i,2)

z=cint(x)+cint(y)

wso.cells(i,3)

Next

wbo.save

exo.Quit

this is the exact script for Reading data from Excel File.

if this script is not clear for you then let me know i'll explain it in clear way ok

Attachments:

Thank u raghavan

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service