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...

Dim ExcelSheet
Set ExcelSheet = CreateObject("Excel.Application")
excelsheet.application.visible = true
ExcelSheet.ActiveSheet.Cells(1,1).Value = "This is column
A, row 1"
' Save the sheet.
ExcelSheet.SaveAs "C:\DOCS\TEST.XLS"
' Close Excel with the Quit method on the Application
object.
ExcelSheet.Application.Quit

after run this script i am getting error"The test cannot
continue due to unrecoverable error"

Answer Posted / nani

Hi try this one:

Set ExcelObj=CreateObject ("Excel.Application")

ExcelObj.WorkBooks.Add

Set NewSheet=ExcelObj.Sheets.Item(1)

NewSheet.Name="Nagendar"

ExcelObj.Cells(1, 1).Value = "Number1"
ExcelObj.Cells(1, 2).Value = "Number2"
ExcelObj.Cells(2, 1).Value = "23"
ExcelObj.Cells(2, 2).Value = "53"
ExcelObj.Cells(3, 1).Value = "63"
ExcelObj.Cells(3, 2).Value = "33"

ExcelObj.ActiveWorkbook.SaveAs "c:\test1.xls"


ExcelObj.Quit
Set ExcelObj = Nothing

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Pls can anybody send me the Recent Technical and Interview Questions Which were asked in IBM(QTP)Automation PLZZZZZZZZZ

2020


How to execute a winrunner script in quicktest professional (qtp)?

955


Can we call qtp test from another test using scripting. Suppose there are 4 tests and I want to call these tests in a main script. Is this possible in qtp?

1089


HOw to add the recovery file at runtime to the test file .

2182


in a web page hoe to check the dynamic links that rechabging with out using regular expressions

2252


What is the use of an object spy tool in qtp?

1015


What are metrics and matrix?

1794


Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain

1936


Which environments are supported by hp qtp?

995


When and why to use descriptive programming?

1043


How will you report the bug and explain the defect tracking sheet you handled?

3085


What is use of object spy?

1078


what QTP Options do you know?

3391


What is action split and the purpose of using this in qtp?

1020


Explain about business process component? types and usage?

2046