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

can u test the application without add-in?

1 Answers  


Write a Script for ATM in QTP

0 Answers  


write a vb script to display the reverse of vbs

2 Answers  


What is the use of option explicit in vbscript?

0 Answers  


how to add the shared repository file to the script file while running the script manuall

2 Answers  






Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository

0 Answers  


generic function for webedit box for web application

1 Answers  


Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex

2 Answers  


Differentiate javascript and vbscript?

0 Answers  


what is event handling?

0 Answers  


how to write validation function for date in vb script

0 Answers  


How to Import data from a file (file is on the desktop) to the data table

0 Answers   IBM,


Categories