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
How to Convert Hex color code to color name in VB Script?
Write a Script for ATM in QTP
How are comments handled in the vbscript language?
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..
What are string functions in vbscript?
Mention the rules for using option explicit statement?
What is the use of the formatdatetime function in the vbscript language?
What is the scope of a constant declared using public?
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
Mention what is byref and byval parameters in vbscript?
What are class properties?
How will you get a string with the specified character the specified number of times in vbscript?
What is the event handling in vbscript?
why variable name should not exceed 255 characters?
How to add actions in driver script to run those actions in QTP?