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 |
how will u choose a tool for test automation ?
Hi any body can tell me the in detaled information about Description.Create() thanks in advance
What is the Limitations of Testing ?
what is the test process followed for your project?
How to use transactions in qtp?
1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?
Is it possible to convert QTP scripts to Silk scripts?
which command u will use to access the application through descriptive programing?
hi nani my doubt is how does qtp process metrix related to software process.
I have to pass all the test cases into gmail userid and password using functions please give me code thanks have anice and greate day
Suggest and Define a solution for an application whose objects are not recognized by UFT?
Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance