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

How you are maintaining shared object repository in your team or your project?help me plz

1 Answers   CTS,


suppose the given string str = {"vamsikrishna%%&%*&**"} count the no of vowels and special characters are repeated

2 Answers  


How to covert a String to an integer?

5 Answers  


Can anyone please tell me how to select next 5th business date from calendar using QTP/UFT ?

1 Answers   Cigniti Technologies,


Difference between test object and run time object?

0 Answers  






what is meant by keyword driven frame work can any one answer plzzzzzzzzzzz

1 Answers  


If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

0 Answers  


what is the long form of QTP ?

2 Answers  


We stored into the objects OR and then write the scripting

0 Answers   L&T, Wipro,


In a webpage how to check the dynamic links that re changing regularly?( without using regular expressions.)

3 Answers   Misys,


how to load all resource files(function libraries,object repositories etc) into tests without associating them?

1 Answers  


Shared Object Repository is preferable while dealing with dynamic objects ok? descriptive prog also same? ok but why descriptive?(only for w/o application)

2 Answers   IBM,


Categories