how to open Excel sheet & write in it & save it?



how to open Excel sheet & write in it & save it?..

Answer / guest

Set excel = CreateObject ("EXCEL.Application")
excel.Caption = "Test Caption"
excel.Visible = True
Set doc = excel.Workbooks.Add()
Set selection = excel.Selection
With selection
.Cells(1,1).Value = "Test value"

End With
doc.SaveAs("E:\Excel.xls")
excel.Quit

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More QTP Interview Questions

1. In build1 there is a page with two check boxes and a submit button. You have prepared a script for that page and its working fine. In Build 2 the developers have added two checkboxes in the page. Will the script prepared for Build 1 work for Build 2 or not. If yes, why and if No, why. Remember the developers have not touched the object properties of the textboxes in the page.

3 Answers   ADP,


tell me about regular expressions in QTP? where we use? give eample?

2 Answers   IBM,


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

0 Answers  


How to export quicktest professional (qtp) results to an .xls file?

0 Answers  


Explain the difference between data driven testing and parameterization ?

0 Answers  






What is throw object?

0 Answers  


How is the Bitmap checkpoint different from Image checkpoint?

0 Answers  


What is the extension of script and object repository files?

4 Answers   Crea,


what does it mean when a check point is in red color? what do u do?

4 Answers  


How many types of Recordings are there in QTP and what are they?

7 Answers   Dangote, First Indian Corporation,


How do you handle multiple banners(at the top the page, the banner is scrolling) in a web page(Dont take the name property(regular expression))

0 Answers   CFC, iton,


Hi Friends... By using QTP , can we test .net products...and that product supports different languages.. thanx in advance..

1 Answers  


Categories