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 technology used by vb script?

0 Answers  


explain with example primitive data types of vb script.

1 Answers  


hai..friends ....what is the difference between function and sub procedure ....here every one know's theoretically here my question is what is the meaning of function can return the value and sub can't return the value...can you give one example with some values for that ....what does it mean ? how function can return the value...sub can not...any one please...........with example

1 Answers   Cap Gemini,


Explain the arrays in vb script?

0 Answers  


What is the use of option explicit statement?

0 Answers  






Hi Friends Rajendra this is bhavani prasad, iam working Hyderabad. i faced one problem with qtp recording mode i.e in my application there is 100 records first we click the first record that record will be jumped to next session and 99 records will there stop the recording and run the same script .Run this script qtp does not identify the records. So plz tell me what is the solution.

0 Answers  


Explain some uses of vb script?

0 Answers  


How to check the particular window is exist or not with out using check points

2 Answers  


Explain about arrays in vb script?

0 Answers  


Give examples where vb script can directly run on users system with windows as os?

1 Answers  


How to create a function in vbscript?

0 Answers  


what is the function to get the ascii value of the character?

6 Answers   Netxcell, Oracle,


Categories