How can we open an Excel sheet through the script

Answer Posted / tvsramakrishnachowdary

Hi Chandra sekhar...

Every time ur approach is abt recording...pls try to avoid
that..it will creates u prob in the real time..ok...

follow following code...
-----------------------------
set xa=createobject("excel.application")
set xb=xa.workbooks.open("d:\sample.xls")
set xs=worksheets("sheet1")
val=xs.cells(1,1).value
msgbox val

NOTE:here (1,1)--->1st row,1st column

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why qtp always start action1 and does not start action?

617


If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?

1751


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

2921


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

2360


Can anyone share/send me QTP 8.2 Crack as I had it before but now it's virus affected. Pls send me on Sawale.vijay@gmail.com Thanks, ~Vijay

2676






what type of values given to objects. EX::Set oBrowser=Description.Create oBrowser(“micclass”).Value=”Browser”

1496


1.How to record ,capture and also script to capture the close buttons. 2.How to record ,capture and also script to capture the options ---File ->save and File ->close in a browser and PDF files. 3.How to compare the Excel sheet values in a report using QTP scripting. 4.How to compare 2 PDf reports using QTP scripts as well reording. 5.How to compare 2 Excel reports using QTP scripts as well reording. 6.How to save a PDF report to a folder and then translate the report to an Excel type of report and compare that Excel Report with an other excel report. Please clarify me

1606


how to test load test and block box testing an a web based application pls give ans briefly

1368


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

1357


What is ‘object spy’ and what is the function of object spy in qtp?

583


Hello Everyone, Please provide me the practical example of business component concept of QTP.Like how to create business component,how to connect the quality center etc.... Thanks in advance, Gaytri

1419


explain keyword driven framework with banking domain?

1569


Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John

2171


Write the script to delete the mail which is at 9th,13th and 18th place in INBOX of Gmail ?

1686


What is optional step in qtp? How you can add optional step in qtp?

544