How open an excel sheet in QTP(not a run time )?
Answers were Sorted based on User's Feedback
Answer / king
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Application.Visible = True
Set ExcelBook = ExcelApp.Workbooks.Add
ExcelBook.Worksheets(1).Cells(1,1).Value="Ankush"
ExcelBook.Worksheets(2).Cells(1,1).Value="Raju"
ExcelBook.SaveAs "C:\test1.xls"
ExcelApp.Quit
Set ExcelApp = Nothing
msgbox "Completed"
Is This Answer Correct ? | 7 Yes | 4 No |
Answer / pramod
Hello,
It asked for "not a run time " means "not in run time"
Why do you write all VB script code to open Excel in run
time.
It is simple. Click View - data table in QTP.
Right click on Data table window. Select File - Import.
Select the Excel file. that is it.
Is This Answer Correct ? | 5 Yes | 2 No |
Answer / cxv
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Application.Visible = True
Set ExcelBook = ExcelApp.Workbooks.Add
ExcelBook.Worksheets(1).Cells(1,1).Value="A"
ExcelBook.Worksheets(2).Cells(1,1).Value="Ra"
ExcelBook.SaveAs "C:\test1.xls"
ExcelApp.Quit
Set ExcelApp = Nothing
msgbox "Completed"
Is This Answer Correct ? | 1 Yes | 2 No |
Hi, I am using OutputCheckPoint for 2 webelements Bed:4 and Bath:2 Full,1 partial in my result page and I am storing the value in the data table. I dont need the string Bed:4,I would like to get only the no 4. How can I get it? Even though I highlight only 4,It is seleting the full value "bed 4". Same thing happend for second webelement Bath:2 Full,1 partial I need only the No 2. I used the following to split MyArray = Split(UIBathResult, " ", -1, 1) But it is giving the value My Array(0)=Bath:2full,1Partial I need the only the nos for further comparision.Any help? Thanks Uma
If u prepare bug report in Excel sheet . Is it possible to send thrw Test director? how it is?
Qtp has been installed on my pc but recently ON opening it is giving this error PLEASE REPLY IT IS URGENT IT WAS WORKKING FINE QTPRO.EX THE instruction at "0x7.. ...". referenced memory at "0000....The memory could not be read... Awaiting QTP XPERTS REPly URGENT
HI How to take screenshots of a Webpage and saving it in a external word document using QTP.
How does QTP identifies the object in the application?
Hi, Can we open a test in qtp10 which is saved in qtp 9.2?
What is the advantage of associating a procedure with a test object?
How to swap two numbers by using parameter passing method byref in a fucntion and return the result to outside of the function?
Explain in brief about the QTP Automation Object Model.
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
Hi Guys...I just started working with QTP now.The frame work they use hear is Write all the functions in function libraries and pass data using data dictionary either from data table or excel .I kind of understood evrthing but one thing I need to know is How do they recognize objects .Do they use object spy and recognize objects or record them ..Does soemone have any idea how they generally do this is such kind of framework
Explain roles and responsibilites of 2yrs Automation qtp engineer.