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

Anyone have qtp11.0 crack?

2601


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

2263


What are the naming conventions while declaring a variable in the vbscript language?

830


How to open a file. What is the perpose of true and false mode there?

837


How to identify column in VSFlexgrid? My VSFlexgrid window is identified as 'Active X Control'

3514


In html file what is an ideal position to include vbscript?

1083


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

1275


what is diff between static and dynaic arrys?

1828


How to Enter Values on the Command promt using VB script

1746


Capture the Unique label changes on google home page for I am feeling lucky button and save those label changes to Notepad Note: Using QTP

2082


Mention what if you do not specify anything when you call a procedure?

763


What are the different types of operators and their order of precedence?

794


When to use function procedures and what are its characteristics?

806


Mention how to assign a date value to a variable?

823


What methods are used to create text files and open text files in the vbscript language?

746