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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How to Convert Hex color code to color name in VB Script?

4181


Write a Script for ATM in QTP

3621


How are comments handled in the vbscript language?

753


I am working on QTP, got struck in one place.. In my application depending upon configuration WebEdit count is increasing/ decreasing.. how to get these webedits..

2026


What are string functions in vbscript?

872


Mention the rules for using option explicit statement?

718


What is the use of the formatdatetime function in the vbscript language?

788


What is the scope of a constant declared using public?

758


how to write codings in QTP using vb script. please help me. i am new to QTP. it is easy or very much tough. please tell me

13541


Mention what is byref and byval parameters in vbscript?

795


What are class properties?

902


How will you get a string with the specified character the specified number of times in vbscript?

807


What is the event handling in vbscript?

769


why variable name should not exceed 255 characters?

2013


How to add actions in driver script to run those actions in QTP?

1732