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

What are the types of object repositories? Which one is you using?

0 Answers  


what are the limitations of automation testing?

2 Answers   TCS,


Explain Descriptive Programming Types with Examples?

0 Answers  


how to parameterizing values from an excel sheet in Quick test professional?

1 Answers  


What is Unicode Compatibility?

0 Answers   HCL,






I have 5 save buttons in 5 tabs . The tabs are placed one after the other. My object repository have these added as 5 save buttons with name sav1, save 2, save 3 , save 4, save 5 .all are getting highlighted from OR but they are not getting clicked. After spying each button all the properties are same except First button Index 0 html id:=btnSaveTab1 outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab1"" value=""Save"" type=""button"">", Second button "html id:=btnSave "outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"">", Third button "html id:=", outerhtml:=<input id=""btnSaveTab1"" class=""Button"" onclick=""document.getElementById('a1').click();"" name=""btnSaveTab Fourth button "html id:=btnSave outerhtml:=<input id=""btnSave"" class=""Button"" onclick=""document.getElementById('a2').click();"" value=""Save"" type=""button"" 5th button "html id:=", "outerhtml:=<input class=""Button"" onclick=""document.getElementById('a5').click();"" value=""Save"" type=""button"">",

0 Answers  


Explain about the test fusion report of quicktest professional?

0 Answers  


How to switch between browser tabs? )moving from one tab to another tab)

1 Answers   CTS,


Is it possible to change the name of a test object. I mean when we are recording the script for an object (for Ex: Username is a text field which has value "Babu",i am recording that). Then the Name of the object will become "Babu" in object repository. If i want to change "babu" as "xxxxx" .. is it possible to do? Pls help me in this .. if you didn't understand the question, pls let me know.

4 Answers  


What is test object?

0 Answers  


How to execute a WinRunner Script in QTP?

3 Answers   IBM,


IF I SET THE VIRTUAL OBJECT AFTER THAT MAXIMIZE THE APPLICATION THEN QTP SENT ERROR OR EXECUTE SUCCESSFULLY? WHY ?

2 Answers   CTC, Infosys,


Categories