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 do u do batch testing in WR & is it possible to do in QTP, if so explain?

1 Answers   Crea,


Suppose there are 100 links in a web page and the number of links will be changing dynamically from time to time. I need code such that every time i had to click on the last link of the web page.

4 Answers   Virtusa,


who is the best faculty in Hyderabad for QTP?

47 Answers   IBM,


How can I check if a environment variable exist or not?

0 Answers  


Explain about Test Fusion Report of QTP?

0 Answers  


What is the latest version of qtp?

0 Answers  


Hi Sudhananda, plz send me the QTP framework with any diagram and PPTS . I want to switch to automatio, I done QTP from professional person, but he does not give me his knowledge properly. so pls help me Thaks send me on following address mirajkar.akash@gmail.com

0 Answers   TechSoft,


Among all the check points what is the most important checkpoint?

5 Answers   Semantic Space,


1--How many functions u develop 2--What is an array 3-- where is ur server 4--U involved in unit testing 5--how ur test the background colour using QTP

0 Answers  


I have 14 itmes in a drop down that are associated with an account And these items change with different accounts I want to be able to define it by and index number or any other id so if I enter 2 in my Global excel sheet it selects the 2nd item from the drop down - is this possible?

5 Answers   Rogers,


Can you expect major bugs in Net banking Application?

1 Answers  


WHO TAKE DECISION TO RELEASE THE BUILD

2 Answers   IGT,


Categories