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
What is the scope of a constant declared using public?
How will you compare two strings in vbscript?
How will you get the last occurrence of one string within another string using vbscript?
What is the difference between VBScript and JavaScript?
create a form to accept username and password validate the username and password with using message box, display the corresponding user message
regular expression that will recognize a browser as long as its name property starts with mybrowser
Which date function is used in the vbscript language to find the difference between the 2 dates?
what is the features of visual basic?
What is the extension of the vbscript file?
Write a code to print numbers from 5 to 0?
How will you get a string with the specified character the specified number of times in vbscript?
how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me
I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?
Which function is used in the vbscript language to convert the specified expression into a date type value?
What is the purpose of drive object of scripting.filesystemobject class in vbscript?