How to create a new excel sheet using QTP and then close it.

Showing Answers 1 - 3 of 3 Answers

Hi ,

Below code will be helpful for creating  and closing excel sheet

Dim xlApp
Dim xlBook
Dim xlSheet

Set xlApp=CreateObject("Excel.Application")
Set xlBook=xlApp.workbooks.add
Set xlSheet=xlBook.activesheet
xlSheet.cells(1,1)="helloo"


xlBook.saveas "c:test.xls"
xlApp.quit

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions