QTP Script to delete all the worksheets except for the first worksheet-VB Script to delete all the worksheets except for the first worksheet

QTP Script to delete all the worksheets except for the first worksheet



 Set Excel = CreateObject("Excel.Application")

 Excel.Visible = True

 Set Workbook = Excel.Workbooks.Open("C:\qtp.xls")

 i = Workbook.Worksheets.Count

 Do Until i = 1

 Workbook.Worksheets(i).Delete

 i = i - 1

 Loop

No comments:

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge