How open an excel sheet in QTP(not a run time )?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi,All How to create a link in excel sheet using qtp

3003


How to carry out bit map check points in QTP

1769


Explain types of descriptive programming?

591


What kinds of security (firewalls, encryptions, passwords, etc.) will be required and what is it expected to do? How can it be tested?

643


how to disable the pop ups through QTP using a script

1732






How to do call a output parameter from one action to another action??/

1875


Hi All, issue is related to handling pop up script generated in IE, and run on mozilla. In App Under Test, when we get the alert pop ups, we just click ok button. if we need to run the same code on mozilla it will not identify . so we will check browser if browser(*).dialog(IE object).exits browser(*).dialog(IE object).winbutton(OK).click else 'by default mozilla browser(*).dialog(mozilla object).page(*).webbutton(OK).CLICK END IF But my qustion is. Do we write the above piece of code where ever we get such kind of pop ups from the application like alert pop up, confirmation pop up.... OR do we have any other alternative way to do this by using any functions in Recovery Scebarios? If Any of u know idea please do help me in this regard. or send answer to kravimb@gmail.com

1435


What is quicktest professional (qtp)?

567


There is an excel file of 1 to 100 sheets how you will iterate through it?

532


How will you find the current time of the remote machine using QTP script?

601


What are the properties you would use for identifying a browser and page when using descriptive programming?

635


What are the types of object repository in qtp?

569


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

3251


What is difference between design time and run time data table?

587


Explain the difference between data driven testing and parameterization ?

592