Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

0 Answers  


How will you get a random number between 0 and 1 in vbscript?

0 Answers  


Write a VB Script to count blank Lines in a notepad

2 Answers   IBM,


find the length of the string without using length function?

4 Answers   CSS Corp,


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?

0 Answers  


What is the event handling in vbscript?

0 Answers  


We have an application which is built using multiple technologies and are using QTP as the tool for Automating the same. While we spy over a combo box in this application, we get the object name as a "Combo Control" and we are not able to perform any action over this object in either selecting or checking any method for the same like "Exist" etc. Hence we thought of a solution and the same can be found below

0 Answers  


Explain about the functionality of vb script?

0 Answers  


what is the purpose of the Reporter.ReportEvent in QTP and also please give the brief description about Reporter.ReportEvent ?

4 Answers   CybAge,


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

0 Answers  


who you define variables and functions in VB?

1 Answers  


reverse the string without using reverse string?

2 Answers   CSS Corp,


Categories