How can we open an Excel sheet through the script
Answers were Sorted based on User's Feedback
Answer / uday kumar_anem
If you want to open Excel sheet using QTP, follow the below
script:
Dim objexcel
Set objExcel = createobject("Excel.application")
Set objWB = objExcel.Workbooks.Open("FileName")
Set objWS = objExcel.ActiveWorkbook.Worksheets("SheetName")
objexcel.Visible = True
Is This Answer Correct ? | 33 Yes | 4 No |
Answer / sreekanth chilam
HI All,
Try for this three ways given below :
1.
SystemUtil.Run "excelsheet path"
2.
Dim xl
Set xl=CreateObject("Excel.Application")
xl.Visible=True
xl.WorkBooks.Open "ExcelSheet path"
xl.ActiveWorkBook.Save
xl.Application.Quit
Set xl=Nothing
3.Dim xl
Set xl=CreateObject("WScript.Shell")
xl.Run "Excel.exe"
Is This Answer Correct ? | 10 Yes | 2 No |
Answer / 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 |
Answer / arv
Try this out..It worked form me.. http://www.ibm.com/developerworks/linux/library/l-pexcel/
Is This Answer Correct ? | 0 Yes | 3 No |
Answer / mukesh raghav
We can open a excel sheet from the given location.
First you write a script in ksh shell and mentioned the
actual path of the sheet and try to run your script.
Is This Answer Correct ? | 0 Yes | 5 No |
Answer / bhaskar pothuri
This question is related to automation. As an example we
can open an excel sheet in QTP using the library functions
available in the VB scripting.
Is This Answer Correct ? | 9 Yes | 16 No |
Answer / k.chandra sekhar
a) In QTP data table have two types of the Excel sheet.
b) If the extra Excel sheet wants then you create in
the data table window in QTP. This facility is possible in
QTP data table window.
c) If you want script to excel sheet then start the
record and open the one new excel sheet then stop the
record after check script. That is the script of the excel
sheet.
d) Once do this function of the excel sheet. if you
get the scripts.
My name is k.chandra sekhar,
My phone no is 09246540049,
Hyderabad.
My mail id is ndra_143@yahoo.co.in
If any body want full explain send the mail
Is This Answer Correct ? | 4 Yes | 16 No |
Answer / srikanth
InvokeApplication("C:\Documents and Settings\All
Users\Start Menu\Programs\ExcellSheet")
Is This Answer Correct ? | 1 Yes | 14 No |
What is synchronization? What are the ways you can synchronize?
Test script is generated and it is enhanced.It is required to be saved.But the disk space is insufficient.You are not permitted to delete any scripts.How are you going to save?
How QTP recognizes Objects in AUT?
I want to test advanced Java applications what kind of add- ins I have to install?
Where should i find checkpoint and virtual objects's Object properties and values in the QTP 9.2 Means where checkpoints or virtual objects related data will store If i want to get the runtime object properties how can i use Getroproperties on Checkpoints
QTP in mumbai
Explain roles and responsibilites of 2yrs Automation qtp engineer.
Which property will you use to check the object state? (Exist)
How you r using QTP in u r project
1 Answers IBM, Lehman Brothers,
How to connect QTP to Testdirector
How to Compare two database tables by using QTP?Please give me code details.
What are the different types of functions available in qtp and explain ?