Ravik
8 years agoSuper Contributor
How to get Excel sheet name in TestComplete:Python
I am looking for a way to read all of the sheet names from an Excel workbook. Since the ExcelDriver requires a sheet name I am not sure how to do this. I am using Python script. Any ideas?
My Code like -
ExcelObj = Sys.OleObject["Excel.Application"]
#Delay(1000)
WorkbookObj = ExcelObj.Workbooks.open("path of excel file")
--- worksheetobj = WorkbookObj.name('Sheet1')--- Error statement
----worksheetobj = WorkbookObj.get_sheet_by_name('Sheet1') --- tried this also