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"]
WorkbookObj = ExcelObj.Workbooks.open("path of excel file")
--- worksheetobj = WorkbookObj.name('Sheet1')--- Error statement
----worksheetobj = WorkbookObj.get_sheet_by_name('Sheet1') --- tried this also
this may help you........
@NisHera Thanks for help,
Is there any Python code for same or do we need to import any external python libraries like - import openpyxl
to perform action.
I don't thing you need external libraries
pl check your sample code usually at C:\Users\Public\Documents\TestComplete 12 Samples\Common\MSOffice\Python\Excel_Python
I am using TestComplete 11.3, there is no sample for Python 😞
Well I have import openpyxl library and used openpyxl libraries functions.