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"
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / dipti
Dim ExcelSheet, excelobj
Set ExcelObj = CreateObject("Excel.Application")
excelObj.visible = true
ExcelObj.Workbooks.Add
Set ExcelSheet = ExcelObj.Sheets.Item(1)
ExcelSheet.Cells(1,1).Value = "This is column A, row 1"
' Save the sheet.
ExcelObj.ActiveWorkBook.SaveAs "C:\TEST.XLS"
' Close Excel with the Quit method on the Application
' object.
ExcelObj.Quit
Set excelobj = nothing
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / abhishek
hi friends
Try this code. it must work.
setexcel=createobject("excel.application")
setexcelsheet=createobject("excel.sheet")
excelsheet.application.visible=true
excel.activesheet.cells(1,1).value=1111
excel.activesheet.cells(1,2).value=2222
excel.activesheet.cells(2,1).value=1111
excel.activesheet.cells(2,2).value="aaaa"
excelsheet.saveas "c:\xyz.xls"
Is This Answer Correct ? | 4 Yes | 6 No |
What are the types of Object Repository’s in QTP?
Hai Friends this is Rajesh , Is there any Site or Blog that Video tutorials of Qtp that can be free downloadable to Pc. Friends if any body know that site or blog please send me because i'm really in need for that because i cannot affordMoney in learning Course in Institutes due to Financial Problem . So please Forward that Site or Blog which provides Downloadable Video Tutorials in Free to PC , As My Friend is having PC thru that I'm planning to learn. So Kindly help me Friends if you are aware of that Site/Blog
Diff between WEB APPLICATION AND CLIENT-SERVER APPLICATION?
When using descriptive programming?
Please give me the steps to carry out datadriven in QTP8.2
wht type of User defined functions or Java Releated functions Do we write in VB scripting
How can I replace all the text from the QTP script with some other text. Is there any replace all function in QTP Any one can help me
How will you handle java tree in qtp?
HOW TO DO THE BATCH TESTING USING QTP?
How to record right click of a context menu and click on the selection ?
How to handle "Java Runtime error" popup window in the web application ? Sometimes the application throws the error repeatedly... Is there any browser setting available to disable the error ?
Hi any body can tell me the in detaled information about Description.Create() thanks in advance