QTP Script to get name of all worksheets of an excel sheet
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("C:\qtp.xls")
For Each objWorksheet in objWorkbook.Worksheets
Msgbox objWorksheet.Name
Next
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("C:\qtp.xls")
For Each objWorksheet in objWorkbook.Worksheets
Msgbox objWorksheet.Name
Next
No comments:
Post a Comment