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 / 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 |
Post New Answer View All Answers
Explain how you can find the absolute value of the number in qtp?
What is post recovery scenario?
How many types of recording modes in qtp? Describe each type with an example where we use them?
An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?
Explain different recording modes?
Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?
What are the properties you would use for identifying a browser and page when using descriptive programming?
Brief the process of testing with UFT?
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
describe some problems that u had with automating testing tool?
Does QTP record on Objects created on XWindows Environment?
What are the ways you can synchronize?
What are private functions in QTP? How they can be called from the function library?
What are the features of quick test pro(qtp)?
Anybody plz give, How do you test aframe in a web page? If page cotain text message or Images, tables?