Can any 1 modify the code whr in want to add\rename a excel
sheet in qtp?



Can any 1 modify the code whr in want to add\rename a excel sheet in qtp?..

Answer / senthkum

Option Explicit

Dim Excel, ExcelSheet, b, c, rc, a

Set Excel=createObject("Excel.Application")
Set ExcelSheet=createObject("Excel.sheet")
ExcelSheet.Application.visible=true


'''''storing the datas into excel sheet'''''''''''
a = "senthil"
b = "mercury"
c = "Pass"



Excel.ActiveSheet.cells(1,1).value="AgentName"
Excel.ActiveSheet.cells(1,2).value="Password"
Excel.ActiveSheet.cells(1,3).value="Result"

Excel.ActiveSheet.cells(2,1).value= a
Excel.ActiveSheet.cells(2,2).value= b
Excel.ActiveSheet.cells(2,3).value= c

ExcelSheet.SaveAs "C:\excelwrite.xls"

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More VB Script Interview Questions

Mention what is the main difference between function and sub-procedure?

0 Answers  


a;;b;c;;;d in this string output is abcd will come how can we do that in vbscript in QTP testing?

2 Answers  


how to check whether link is disabled in QTP??

0 Answers  


input values to accept 2 numbers & print the product, difference and sum using switch case

1 Answers   CSC,


How do you get the value of a combo box in Javascript?

2 Answers   Aspire,


Difference between dim,public and private variables in vb script?

0 Answers  


Can automation testing find ssame no. of bugs what we can find by manual testing?

0 Answers  


Mention how you can call vbscript functions?

0 Answers  


how to add action through AOM in QTP

0 Answers  


Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji

0 Answers  


how to declare a variable in vbscript using vbscript

4 Answers  


about vb scripting programs this type of all question& answers

0 Answers  


Categories